summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2014-02-18 16:37:20 -0800
committerBrian Dolbec <dolsen@gentoo.org>2014-02-18 16:57:47 -0800
commitf9b0cf555a5178883ab1e817bd801e4a7ff4b83c (patch)
treedf32c0f1d7f2f6a2b52f26ec7cb97fbf84269f88 /pym
parent3ecac0c4a444eca19f19542db19a8061d796a02f (diff)
downloadgentoolkit-f9b0cf555a5178883ab1e817bd801e4a7ff4b83c.tar.gz
recdep_rebuild/analyse.py: Fix LibCheck.search() overwiting found_libs...
When multiple bit lengths were being searched, only the last bit length was surviving. Added extra debug output to discover the problem.
Diffstat (limited to 'pym')
-rw-r--r--pym/gentoolkit/revdep_rebuild/analyse.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py
index 82393a6..5346c3e 100644
--- a/pym/gentoolkit/revdep_rebuild/analyse.py
+++ b/pym/gentoolkit/revdep_rebuild/analyse.py
@@ -129,6 +129,7 @@ class LibCheck(object):
self.logger = logger
self.searchlibs = searchlibs
self.searchbits = sorted(searchbits) or ['32', '64']
+ self.logger.debug("\tLibCheck.__init__(), new searchlibs: %s" %(self.searchbits))
if searchlibs:
self.smsg = '\tLibCheck.search(), Checking for %s bit dependants'
self.pmsg = yellow(" * ") + 'Files that depend on: %s (%s bits)'
@@ -189,15 +190,15 @@ class LibCheck(object):
for filename, needed in filepaths.items():
for l in needed:
if self.check(l):
+ if not bits in found_libs:
+ found_libs[bits] = {}
try:
found_libs[bits][l].add(filename)
except KeyError:
- try:
- found_libs[bits][l] = set([filename])
- count += 1
- except KeyError:
- found_libs = {bits: {l: set([filename])}}
- count += 1
+ found_libs[bits][l] = set([filename])
+ count += 1
+ self.logger.debug("\tLibCheck.search(); FOUND:"
+ " %s, %s, %s" % (bits, l, filename))
ftime = current_milli_time()
self.logger.debug("\tLibCheck.search(); total libs found: %d in %d milliseconds"
% (count, ftime-stime))