summaryrefslogtreecommitdiffstats
path: root/pym/emerge/__init__.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-10 08:33:36 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-10 08:33:36 +0000
commitd256f98214bcae5d9876507125a38f12799d4639 (patch)
tree48bf7dc4831493246cd37141699ebff58027c511 /pym/emerge/__init__.py
parent540715f6f86b6bb6d39697222565bea7d3939291 (diff)
downloadportage-d256f98214bcae5d9876507125a38f12799d4639.tar.gz
portage-d256f98214bcae5d9876507125a38f12799d4639.tar.bz2
portage-d256f98214bcae5d9876507125a38f12799d4639.zip
Prevent bogus upgrade display when a new-style virtual
is first installed and it replaces an old-style virtual. svn path=/main/trunk/; revision=8039
Diffstat (limited to 'pym/emerge/__init__.py')
-rw-r--r--pym/emerge/__init__.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 123e8683c..4bf7bd4a6 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -3102,10 +3102,15 @@ class depgraph(object):
counters.reinst += 1
elif vardb.match(portage.dep_getkey(pkg_key)):
mynewslot = mydbapi.aux_get(pkg_key, ["SLOT"])[0]
- myoldlist = self.trees[x[1]]["vartree"].dbapi.match(
- portage.pkgsplit(x[2])[0])
- myinslotlist = [inst_pkg for inst_pkg in myoldlist
- if mynewslot == vardb.aux_get(inst_pkg, ["SLOT"])[0]]
+ slot_atom = "%s:%s" % \
+ (portage.cpv_getkey(pkg_key), mynewslot)
+ myinslotlist = vardb.match(slot_atom)
+ # If this is the first install of a new-style virtual, we
+ # need to filter out old-style virtual matches.
+ if myinslotlist and \
+ portage.cpv_getkey(myinslotlist[0]) != \
+ portage.cpv_getkey(pkg_key):
+ myinslotlist = None
if myinslotlist:
myoldbest=portage.best(myinslotlist)
addl=" "+fetch