From: Zac Medico Date: Sat, 1 Sep 2012 20:51:18 +0000 (-0700) Subject: _prepare_self_update: ignore installed version X-Git-Tag: v2.2.0_alpha124~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bb3094fb926910594f26ac3cf246d9aa9f9444d9;p=portage.git _prepare_self_update: ignore installed version 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. --- diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 8ee9a5841..9f1c86e3a 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -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 diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 4c0c45d65..9b678f7fb 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -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