From: Zac Medico Date: Sun, 18 Mar 2012 22:39:40 +0000 (-0700) Subject: unmerge: remove unused preserve-libs X-Git-Tag: v2.2.0_alpha93~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aa7a0a91390accd84c04302e1e738f945aee333a;p=portage.git 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. --- 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):