Recognize git-2.eclass when reinstalling self.
authorZac Medico <zmedico@gentoo.org>
Mon, 14 Feb 2011 15:46:39 +0000 (07:46 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 Feb 2011 15:46:39 +0000 (07:46 -0800)
pym/_emerge/Scheduler.py
pym/_emerge/depgraph.py
pym/_emerge/resolver/output.py
pym/portage/dbapi/vartree.py

index 39e8e6eef35df099b226331975d1d517117b83bc..b129e1a316b962d53c07aef89f371e05c1328532 100644 (file)
@@ -933,7 +933,8 @@ class Scheduler(PollScheduler):
                                return True
                        elif pkg.cpv != self._running_portage.cpv or \
                                '9999' in pkg.cpv or \
-                               'git' in pkg.inherited:
+                               'git' in pkg.inherited or \
+                               'git-2' in pkg.inherited:
                                return True
                return False
 
index cacc8cc5824332096f8f4ffa0aab2457c192b0dc..d83f8a893f37fa74a76943cf127cab75b82cad67 100644 (file)
@@ -4334,7 +4334,8 @@ class depgraph(object):
                        (running_portage is None or \
                        running_portage.cpv != replacement_portage.cpv or \
                        '9999' in replacement_portage.cpv or \
-                       'git' in replacement_portage.inherited):
+                       'git' in replacement_portage.inherited or \
+                       'git-2' in replacement_portage.inherited):
                        # update from running_portage to replacement_portage asap
                        asap_nodes.append(replacement_portage)
 
index 0e7585d29afcd220c184f43b79be9a168cad0114..d573b5d602b7e7d51d8d27620d21707a3cbe833e 100644 (file)
@@ -860,7 +860,8 @@ class Display(object):
 
                                        if not self.vardb.cpv_exists(pkg.cpv) or \
                                                '9999' in pkg.cpv or \
-                                               'git' in pkg.inherited:
+                                               'git' in pkg.inherited or \
+                                               'git-2' in pkg.inherited:
                                                if mylist_index < len(mylist) - 1:
                                                        self.print_msg.append(
                                                                colorize(
index e0f17544b21afc25a73ff49b7c17aa5af435da5d..2e97fdbee34c3daed16833c28714cdf48cc451da 100644 (file)
@@ -3826,11 +3826,17 @@ class dblink(object):
                myroot = None
                if self.vartree.dbapi._categories is not None:
                        self.vartree.dbapi._categories = None
+               reinstall_self = False
                if self.myroot == "/" and \
-                       match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]) and \
-                       (not self.vartree.dbapi.cpv_exists(self.mycpv) or \
-                       '9999' in self.mycpv or \
-                       'git' in self.settings.get('INHERITED', '').split()):
+                       match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]):
+                       inherited = frozenset(self.settings.get('INHERITED', '').split())
+                       if not self.vartree.dbapi.cpv_exists(self.mycpv) or \
+                               '9999' in self.mycpv or \
+                               'git' in inherited or \
+                               'git-2' in inherited:
+                               reinstall_self = True
+
+               if reinstall_self:
                        # Load lazily referenced portage submodules into memory,
                        # so imports won't fail during portage upgrade/downgrade.
                        portage.proxy.lazyimport._preload_portage_submodules()