aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-07-02 15:27:28 -0700
committerZac Medico <zmedico@gentoo.org>2012-07-02 15:27:28 -0700
commitcd6cc7631ac4930bfd89fd56d02e80c6a912ff96 (patch)
tree6119a727b3baea1fbbaaa79b1097c1c1d6134d41
parent_pre_unmerge_backup: show failure message (diff)
downloadportage-cd6cc7631ac4930bfd89fd56d02e80c6a912ff96.tar.gz
portage-cd6cc7631ac4930bfd89fd56d02e80c6a912ff96.tar.bz2
portage-cd6cc7631ac4930bfd89fd56d02e80c6a912ff96.zip
Fix unmerge-backup/preserve-libs interaction.
-rw-r--r--pym/portage/dbapi/vartree.py9
1 files 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: