diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-04 19:01:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-04 19:01:37 +0000 |
commit | 62bf382aed4302c4c98f83437b989dca21f175e9 (patch) | |
tree | 2467806dc1bd5e3b415ad20812d3627c79b45e03 | |
parent | 8ce1c652d2e5203a6d8468bbd43bbe133f989b15 (diff) | |
download | portage-62bf382aed4302c4c98f83437b989dca21f175e9.tar.gz portage-62bf382aed4302c4c98f83437b989dca21f175e9.tar.bz2 portage-62bf382aed4302c4c98f83437b989dca21f175e9.zip |
Bug #249805 - Add some more PreservedLibsRegistry.pruneNonExisting() calls,
to avoid a KeyError from LinkageMap.findConsumers() triggered inside
display_preserved_libs().
svn path=/main/trunk/; revision=12152
-rw-r--r-- | pym/_emerge/__init__.py | 3 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 4 |
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: |