summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-20 09:41:21 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-20 09:41:21 -0700
commit1824d5744ffcfa25bb92c40e2498dd0d3fc5989c (patch)
tree85559132d6cebad1173bc2f120817771c3c2f53b
parentfa17e8a13fc4d4f743bf3ad1aac889c959e1eb0e (diff)
downloadportage-1824d5744ffcfa25bb92c40e2498dd0d3fc5989c.tar.gz
portage-1824d5744ffcfa25bb92c40e2498dd0d3fc5989c.tar.bz2
portage-1824d5744ffcfa25bb92c40e2498dd0d3fc5989c.zip
* Make dblink._linkmap_rebuild() return early if preserve-libs is disabled
and the preserve-libs registry is empty. * Make dblink._find_unused_preserved_libs() return early if the preserve-libs registry is empty.
-rw-r--r--pym/portage/dbapi/vartree.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 688f4c52a..b72cba024 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2870,7 +2870,14 @@ class dblink(object):
return False
def _linkmap_rebuild(self, **kwargs):
- if self._linkmap_broken:
+ """
+ Rebuild the self.linkmap if it's not broken due to missing
+ scanelf binary. Also, return early if preserve-libs is disabled
+ and the preserve-libs registry is empty.
+ """
+ if self._linkmap_broken or \
+ ("preserve-libs" not in self.settings.features and \
+ not self.vartree.dbapi.plib_registry.hasEntries()):
return
try:
self.vartree.dbapi.linkmap.rebuild(**kwargs)
@@ -3048,7 +3055,8 @@ class dblink(object):
Find preserved libraries that don't have any consumers left.
"""
- if self._linkmap_broken:
+ if self._linkmap_broken or \
+ not self.vartree.dbapi.plib_registry.hasEntries():
return {}
# Since preserved libraries can be consumers of other preserved