From 575589606fdfa997a71ba1bbdf4663d5fa005f46 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 4 Nov 2008 17:52:04 +0000 Subject: Synchronize portage update/restart logic in dblink.merge() and depgraph.display() so it's consistent with Scheduler._is_restart_necessary(). Thanks to Jeremy Olexa for reporting. svn path=/main/trunk/; revision=11808 --- pym/_emerge/__init__.py | 12 +++--------- pym/portage/dbapi/vartree.py | 3 ++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 773c01d34..597aace59 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7531,15 +7531,9 @@ class depgraph(object): not self._opts_no_restart.intersection(self.myopts) and \ pkg.root == self._running_root.root and \ portage.match_from_list( - portage.const.PORTAGE_PACKAGE_ATOM, [pkg]): - - pn, ver, rev = pkg.pv_split - if rev == "r0": - myversion = ver - else: - myversion = "%s-%s" % (ver, rev) - - if myversion != portage.VERSION and "--quiet" not in self.myopts: + portage.const.PORTAGE_PACKAGE_ATOM, [pkg]) and \ + not vardb.cpv_exists(pkg.cpv) and \ + "--quiet" not in self.myopts: if mylist_index < len(mylist) - 1: p.append(colorize("WARN", "*** Portage will stop merging at this point and reload itself,")) p.append(colorize("WARN", " then resume the merge.")) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 418d87388..569467115 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3712,7 +3712,8 @@ class dblink(object): if self.vartree.dbapi._categories is not None: self.vartree.dbapi._categories = None if self.myroot == "/" and \ - match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]): + match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]) and \ + not self.vartree.dbapi.cpv_exists(self.mycpv): settings = self.settings base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"]) from tempfile import mkdtemp -- cgit v1.2.3-1-g7c22