From cd6cc7631ac4930bfd89fd56d02e80c6a912ff96 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 2 Jul 2012 15:27:28 -0700 Subject: [PATCH] Fix unmerge-backup/preserve-libs interaction. --- pym/portage/dbapi/vartree.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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: -- 2.26.2