summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-11-17 15:25:03 -0800
committerZac Medico <zmedico@gentoo.org>2011-11-17 15:25:03 -0800
commitd032f01ae3333fa5383aec25878b0eadd95f208b (patch)
tree92a8c9f407713299f7e587cf1679df53d7b3dfbb
parentd3f704a425a50b5cfa997a25866929b30f1b7d0f (diff)
downloadportage-d032f01ae3333fa5383aec25878b0eadd95f208b.tar.gz
portage-d032f01ae3333fa5383aec25878b0eadd95f208b.tar.bz2
portage-d032f01ae3333fa5383aec25878b0eadd95f208b.zip
Tweak the last commit.
-rw-r--r--pym/_emerge/Scheduler.py13
-rw-r--r--pym/portage/package/ebuild/doebuild.py7
2 files changed, 9 insertions, 11 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 393eeb605..ad1a94492 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -76,7 +76,7 @@ class Scheduler(PollScheduler):
frozenset(["--pretend",
"--fetchonly", "--fetch-all-uri"])
- _opts_no_self_reinstall = frozenset(["--buildpkgonly",
+ _opts_no_self_update = frozenset(["--buildpkgonly",
"--fetchonly", "--fetch-all-uri", "--pretend"])
class _iface_class(SlotObject):
@@ -288,17 +288,8 @@ class Scheduler(PollScheduler):
self._running_root, installed=True)
def _handle_self_update(self):
- """
- If portage is updating itself, create temporary
- copies of PORTAGE_BIN_PATH and PORTAGE_PYM_PATH in order
- to avoid relying on the new versions which may be
- incompatible. Register an atexit hook to clean up the
- temporary directories. Pre-load elog modules here since
- we won't be able to later if they get unmerged (happens
- when namespace changes).
- """
- if self._opts_no_self_reinstall.intersection(self.myopts):
+ if self._opts_no_self_update.intersection(self.myopts):
return
for x in self._mergelist:
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 49d3e899e..9e71cfc68 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -2017,6 +2017,13 @@ def _merge_unicode_error(errors):
return lines
def _prepare_self_update(settings):
+ """
+ Call this when portage is updating itself, in order to create
+ temporary copies of PORTAGE_BIN_PATH and PORTAGE_PYM_PATH, since
+ the new versions may be incompatible. An atexit hook will
+ automatically clean up the temporary copies.
+ """
+
# Load lazily referenced portage submodules into memory,
# so imports won't fail during portage upgrade/downgrade.
_preload_elog_modules(settings)