2011-07-16 19:14:33 +02:00
|
|
|
#!/usr/bin/python2
|
|
|
|
|
|
|
|
from entropy.server.interfaces import Server
|
|
|
|
|
|
|
|
srv = Server()
|
|
|
|
bad_pkgs = []
|
|
|
|
|
|
|
|
gtk2_match = srv.atom_match("x11-libs/gtk+:2")
|
|
|
|
gtk3_match = srv.atom_match("x11-libs/gtk+:3")
|
|
|
|
|
|
|
|
for repo_id in srv.repositories():
|
|
|
|
repo = srv.open_repository(repo_id)
|
|
|
|
for pkg_id in repo.listAllPackageIds():
|
2011-07-17 11:38:47 +02:00
|
|
|
deps = repo.retrieveDependencies(pkg_id)
|
2011-07-16 19:14:33 +02:00
|
|
|
for dep in deps:
|
|
|
|
matches, rc = srv.atom_match(dep, multi_match=True, multi_repo=True)
|
|
|
|
if gtk3_match in matches:
|
|
|
|
if gtk2_match in matches:
|
|
|
|
bad_pkgs.append((pkg_id, repo_id))
|
|
|
|
print("found bad package: %s" % (repo.retrieveAtom(pkg_id),))
|
2011-07-16 23:38:32 +02:00
|
|
|
break
|
2011-07-16 19:14:33 +02:00
|
|
|
|
2011-07-16 23:38:32 +02:00
|
|
|
bad_atoms = []
|
2011-07-16 19:14:33 +02:00
|
|
|
for pkg_id, repo_id in bad_pkgs:
|
2011-07-16 23:38:32 +02:00
|
|
|
bad_atoms.append(srv.open_repository(repo_id).retrieveKeySlotAggregated(pkg_id))
|
|
|
|
bad_atoms.sort()
|
|
|
|
for bad_atom in bad_atoms:
|
|
|
|
print(bad_atom)
|
2011-07-16 19:14:33 +02:00
|
|
|
|
|
|
|
srv.shutdown()
|