Tweak the last commit.
authorZac Medico <zmedico@gentoo.org>
Thu, 17 Nov 2011 23:25:03 +0000 (15:25 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 17 Nov 2011 23:25:03 +0000 (15:25 -0800)
pym/_emerge/Scheduler.py
pym/portage/package/ebuild/doebuild.py

index 393eeb605970b7427bd42bf382a21132680a7368..ad1a9449272097c6c6da9863810beefbc72bffa8 100644 (file)
@@ -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:
index 49d3e899e48c1ca3232124c9f6612a7edd3ddfcb..9e71cfc68845e27e2c874ee72e55bc006bb5cfd5 100644 (file)
@@ -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)