aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-03-18 15:39:40 -0700
committerZac Medico <zmedico@gentoo.org>2012-03-18 15:39:40 -0700
commitaa7a0a91390accd84c04302e1e738f945aee333a (patch)
tree384398f8d359a676556e3d9e8b553d7e9939df67 /pym/portage/dbapi
parentdispatch_conf: fix broken diffstatusoutput_len (diff)
downloadportage-aa7a0a91390accd84c04302e1e738f945aee333a.tar.gz
portage-aa7a0a91390accd84c04302e1e738f945aee333a.tar.bz2
portage-aa7a0a91390accd84c04302e1e738f945aee333a.zip
unmerge: remove unused preserve-libs
This fixes a case were one or more packages are unmerged without being replaced, and some preserved libraries need to be removed because they all consumers have just been unmerged.
Diffstat (limited to 'pym/portage/dbapi')
-rw-r--r--pym/portage/dbapi/vartree.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 4811e60bd..0bcc94729 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1966,6 +1966,15 @@ class dblink(object):
contents=contents, env=self.settings,
writemsg_level=self._display_merge, vardbapi=self.vartree.dbapi)
+ unmerge_with_replacement = preserve_paths is not None
+ if not unmerge_with_replacement:
+ # When there's a replacement package which calls us via treewalk,
+ # treewalk will automatically call _prune_plib_registry for us.
+ # Otherwise, we need to call _prune_plib_registry ourselves.
+ # Don't pass in the "unmerge=True" flag here, since that flag
+ # is intended to be used _prior_ to unmerge, not after.
+ self._prune_plib_registry()
+
return os.EX_OK
def _display_merge(self, msg, level=0, noiselevel=0):