From: Zac Medico Date: Mon, 2 Jul 2012 22:27:28 +0000 (-0700) Subject: Fix unmerge-backup/preserve-libs interaction. X-Git-Tag: v2.2.0_alpha116~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cd6cc7631ac4930bfd89fd56d02e80c6a912ff96;p=portage.git Fix unmerge-backup/preserve-libs interaction. --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index d61975471..289eaaeb9 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1832,9 +1832,6 @@ class dblink(object): except UnsupportedAPIException as e: eapi_unsupported = e - self._prune_plib_registry(unmerge=True, needed=needed, - preserve_paths=preserve_paths) - builddir_lock = None scheduler = self._scheduler retval = os.EX_OK @@ -1849,6 +1846,9 @@ class dblink(object): prepare_build_dirs(settings=self.settings, cleanup=True) log_path = self.settings.get("PORTAGE_LOG_FILE") + # Do this before the following _prune_plib_registry call, since + # that removes preserved libraries from our CONTENTS, and we want + # may want to backup those libraries first. if not caller_handles_backup: retval = self._pre_unmerge_backup(background) if retval != os.EX_OK: @@ -1856,6 +1856,9 @@ class dblink(object): level=logging.ERROR, noiselevel=-1) return retval + self._prune_plib_registry(unmerge=True, needed=needed, + preserve_paths=preserve_paths) + # Log the error after PORTAGE_LOG_FILE is initialized # by prepare_build_dirs above. if eapi_unsupported: