summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-10-16 14:28:47 +0000
committerMarius Mauch <genone@gentoo.org>2007-10-16 14:28:47 +0000
commit1d0c37a4c5f2e2d1130659d9edcb1a212d307d77 (patch)
treeb6eca4bd11c970c99d4317deaed71921c2579547 /pym
parenteedc9cefc37526a6d1f224458fe3b1aef81e0de3 (diff)
downloadportage-1d0c37a4c5f2e2d1130659d9edcb1a212d307d77.tar.gz
portage-1d0c37a4c5f2e2d1130659d9edcb1a212d307d77.tar.bz2
portage-1d0c37a4c5f2e2d1130659d9edcb1a212d307d77.zip
Add debug mode to display the libraries that cause the package to be included
svn path=/main/trunk/; revision=8143
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/sets/dbapi.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pym/portage/sets/dbapi.py b/pym/portage/sets/dbapi.py
index fbff27054..bc842ae2c 100644
--- a/pym/portage/sets/dbapi.py
+++ b/pym/portage/sets/dbapi.py
@@ -113,9 +113,10 @@ class CategorySet(PackageSet):
class LibraryConsumerSet(PackageSet):
_operations = ["merge", "unmerge"]
- def __init__(self, vardbapi):
+ def __init__(self, vardbapi, debug=False):
super(LibraryConsumerSet, self).__init__()
self.dbapi = vardbapi
+ self.debug = debug
def mapPathsToAtoms(self, paths):
rValue = set()
@@ -162,11 +163,19 @@ class MissingLibraryConsumerSet(LibraryConsumerSet):
found=True
break
if not found:
+ print "missing library: %s" % lib
+ print "consumers:"
+ for x in self.dbapi.libmap.get()[lib]:
+ print " ", x
consumers.update(self.dbapi.libmap.get()[lib])
if not consumers:
return
self._setAtoms(self.mapPathsToAtoms(consumers))
def singleBuilder(cls, options, settings, trees):
- return MissingLibraryConsumerSet(trees["vartree"].dbapi)
+ if options.get("debug", "true").lower() in ["true", "on", "1", "yes"]:
+ debug = True
+ else:
+ debug = False
+ return MissingLibraryConsumerSet(trees["vartree"].dbapi, debug=debug)
singleBuilder = classmethod(singleBuilder)