summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-14 07:46:39 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-14 07:46:39 -0800
commit486dfbcba80e968457401913b4fb5943ea971b53 (patch)
treeaff07bf684fb6d9740213a456a78478975c02920
parent60f55ab3ee1575c2d72870c351b7b336a4900caa (diff)
downloadportage-486dfbcba80e968457401913b4fb5943ea971b53.tar.gz
portage-486dfbcba80e968457401913b4fb5943ea971b53.tar.bz2
portage-486dfbcba80e968457401913b4fb5943ea971b53.zip
Recognize git-2.eclass when reinstalling self.
-rw-r--r--pym/_emerge/Scheduler.py3
-rw-r--r--pym/_emerge/depgraph.py3
-rw-r--r--pym/_emerge/resolver/output.py3
-rw-r--r--pym/portage/dbapi/vartree.py14
4 files changed, 16 insertions, 7 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 39e8e6eef..b129e1a31 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -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
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index cacc8cc58..d83f8a893 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -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)
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 0e7585d29..d573b5d60 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -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(
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index e0f17544b..2e97fdbee 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -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()