diff options
author | Slawek Lis <slis@gentoo.org> | 2014-11-12 07:50:01 +0100 |
---|---|---|
committer | Slawek Lis <slis@gentoo.org> | 2014-11-12 07:50:01 +0100 |
commit | 3a9aced06871aa68dcc27e5eba1e56608ecc587d (patch) | |
tree | 5f24511493afa271c6c7717100231431550d3b33 /pym/gentoolkit/revdep_rebuild/analyse.py | |
parent | revdep --library fixes (diff) | |
download | gentoolkit-3a9aced06871aa68dcc27e5eba1e56608ecc587d.tar.gz gentoolkit-3a9aced06871aa68dcc27e5eba1e56608ecc587d.tar.bz2 gentoolkit-3a9aced06871aa68dcc27e5eba1e56608ecc587d.zip |
--library option - partial filename checking
Diffstat (limited to 'pym/gentoolkit/revdep_rebuild/analyse.py')
-rw-r--r-- | pym/gentoolkit/revdep_rebuild/analyse.py | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index 556812d..c0e7231 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -148,24 +148,21 @@ class LibCheck(object): '''Internal function. Use the class's setlibs variable''' sonames = [] for s in self.searchlibs: - par, soname = os.path.split(s) - if par: - # consider as this is full pathname - # we need soname only - - if os.path.exists(s): - # try to extract some more info - for line in scan(['-BF', '%f %S %M'], [s], 1, self.logger): - _, soname, bits = line.split() - bits = bits[8:] - if bits == b: - # we don't want to look in inappropriate arch's libs - sonames.append(soname) - continue - sonames.append(soname) - else: - # this is only filename or it's part - sonames.append(soname) + if s in self.scanned_files[b].keys(): + sonames.append(s) + continue + + found_partial = [a for a in self.scanned_files[b].keys() if s in a] + if found_partial: + sonames += found_partial + continue + + for k, v in self.scanned_files[b].items(): + for vv in v.keys(): + if s in vv: + sonames.append(k) + break + self.alllibs = '|'.join(sonames) + '|' self.logger.debug("\tLibCheck._setslibs(), new alllibs: %s" %(self.alllibs)) |