_prepare_self_update: ignore installed version
authorZac Medico <zmedico@gentoo.org>
Sat, 1 Sep 2012 20:51:18 +0000 (13:51 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 1 Sep 2012 20:51:18 +0000 (13:51 -0700)
Now portage will unconditionally make a temporary copy of itself during
updates. This is safer, since it provides maximum protection against
any possible incompatibilities. For example, suppose that the ebuild
has been updated to change the location of installed files (such as
libdir change) without a revision bump.

pym/_emerge/Scheduler.py
pym/portage/package/ebuild/doebuild.py

index 8ee9a5841059ec9794c287c8b0c9ce916ae85bab..9f1c86e3a137b7920248302e1699a5f8f8887f43 100644 (file)
@@ -300,15 +300,10 @@ class Scheduler(PollScheduler):
                        if not portage.dep.match_from_list(
                                portage.const.PORTAGE_PACKAGE_ATOM, [x]):
                                continue
-                       if self._running_portage is None or \
-                               self._running_portage.cpv != x.cpv or \
-                               '9999' in x.cpv or \
-                               'git' in x.inherited or \
-                               'git-2' in x.inherited:
-                               rval = _check_temp_dir(self.settings)
-                               if rval != os.EX_OK:
-                                       return rval
-                               _prepare_self_update(self.settings)
+                       rval = _check_temp_dir(self.settings)
+                       if rval != os.EX_OK:
+                               return rval
+                       _prepare_self_update(self.settings)
                        break
 
                return os.EX_OK
index 4c0c45d6507933fb02983c977025f119a4e992b8..9b678f7fb56a40cde003dcdf8b37aba2bc2b936b 100644 (file)
@@ -2129,11 +2129,6 @@ def _handle_self_update(settings, vardb):
        if settings["ROOT"] == "/" and \
                portage.dep.match_from_list(
                portage.const.PORTAGE_PACKAGE_ATOM, [cpv]):
-               inherited = frozenset(settings.get('INHERITED', '').split())
-               if not vardb.cpv_exists(cpv) or \
-                       '9999' in cpv or \
-                       'git' in inherited or \
-                       'git-2' in inherited:
-                       _prepare_self_update(settings)
-                       return True
+               _prepare_self_update(settings)
+               return True
        return False