commit:     3a9aced06871aa68dcc27e5eba1e56608ecc587d
Author:     Slawek Lis <slis <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 12 06:50:01 2014 +0000
Commit:     Slawek Lis <slis <AT> gentoo <DOT> org>
CommitDate: Wed Nov 12 06:50:01 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=3a9aced0

--library option - partial filename checking

---
 pym/gentoolkit/revdep_rebuild/analyse.py | 33 +++++++++++++++-----------------
 1 file 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))
 

Reply via email to