summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2008-06-17 17:03:40 +0000
committerMarius Mauch <genone@gentoo.org>2008-06-17 17:03:40 +0000
commit467975ea2355033e6fa6a8fab835b42a8a1dab39 (patch)
treee619ea8f119379b0d3141563d70a27f0498be493 /pym
parent3aebdba090309445bfd509370f3ef759e1b6a3b5 (diff)
downloadportage-467975ea2355033e6fa6a8fab835b42a8a1dab39.tar.gz
portage-467975ea2355033e6fa6a8fab835b42a8a1dab39.tar.bz2
portage-467975ea2355033e6fa6a8fab835b42a8a1dab39.zip
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
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py14
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):