diff options
-rw-r--r-- | pym/portage/dbapi/vartree.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index b184630ac..2dbb747a0 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -180,6 +180,17 @@ class LinkageMap(object): self._libs = libs self._obj_properties = obj_properties + return self._obj_properties[obj] + + def isMasterLink(self, obj): + basename = os.path.basename(obj) + if obj not in self._obj_properties: + obj = os.path.realpath(obj) + if obj not in self._obj_properties: + raise KeyError("%s not in object list" % obj) + soname = self._obj_properties[obj][3] + return (len(basename) < len(soname)) + def listLibraryObjects(self): rValue = [] if not self._libs: @@ -2010,6 +2021,9 @@ class dblink(object): if not has_external_consumers(lib, old_contents, candidates): candidates.remove(lib) continue + if linkmap.isMasterLink(lib): + candidates.remove(lib) + continue # only preserve the lib if there is no other copy to use for each consumer keep = False for c in linkmap.findConsumers(lib): |