From 467975ea2355033e6fa6a8fab835b42a8a1dab39 Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Tue, 17 Jun 2008 17:03:40 +0000 Subject: [PATCH] Do not preserve the master link of a library to avoid packages being linked against preserved libs on rebuilds svn path=/main/trunk/; revision=10693 --- pym/portage/dbapi/vartree.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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): -- 2.26.2