summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py3
-rw-r--r--pym/portage/dbapi/vartree.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 4dfe52a6d..20597c053 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -11374,6 +11374,9 @@ def display_news_notification(root_config, myopts):
def display_preserved_libs(vardbapi):
MAX_DISPLAY = 3
+ # Ensure the registry is consistent with existing files.
+ vardbapi.plib_registry.pruneNonExisting()
+
if vardbapi.plib_registry.hasEntries():
print
print colorize("WARN", "!!!") + " existing preserved libs:"
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 152ec1aa6..4abc1e126 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2062,6 +2062,10 @@ class dblink(object):
break
continue
self.vartree.dbapi.removeFromContents(cpv, removed)
+ else:
+ # Prune any preserved libs that may have
+ # been unmerged with this package.
+ self.vartree.dbapi.plib_registry.pruneNonExisting()
finally:
if builddir_lock: