summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-12-09 16:56:05 -0800
committerZac Medico <zmedico@gentoo.org>2012-12-09 16:56:05 -0800
commit6492e3556114c9306640aeb6f8bfeea65714f8fb (patch)
treee21cf4ac0d3291b1590d0c6cf71e0cf6a9359735
parentecae0c4fc46d6bc8054104a99af90bc45d4e7429 (diff)
downloadportage-6492e3556114c9306640aeb6f8bfeea65714f8fb.tar.gz
portage-6492e3556114c9306640aeb6f8bfeea65714f8fb.tar.bz2
portage-6492e3556114c9306640aeb6f8bfeea65714f8fb.zip
emerge --info: handle bug #446358 morev2.2.0_alpha146
- old-style virtuals - masked packages
-rw-r--r--pym/_emerge/actions.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index fcaa2c1cc..3f7a6d531 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1367,7 +1367,7 @@ def action_info(settings, trees, myopts, myfiles):
bindb = trees[eroot]["bintree"].dbapi
for x in myfiles:
any_match = False
- cp_exists = False
+ cp_exists = bool(vardb.match(x.cp))
installed_match = vardb.match(x)
for installed in installed_match:
mypkgs.append((installed, "installed"))
@@ -1380,13 +1380,17 @@ def action_info(settings, trees, myopts, myfiles):
if pkg_type == "binary" and "--usepkg" not in myopts:
continue
- if not cp_exists and db.cp_list(x.cp):
+ # Use match instead of cp_list, to account for old-style virtuals.
+ if not cp_exists and db.match(x.cp):
+ cp_exists = True
+ # Search for masked packages too.
+ if not cp_exists and hasattr(db, "xmatch") and \
+ db.xmatch("match-all", x.cp):
cp_exists = True
matches = db.match(x)
matches.reverse()
for match in matches:
- any_match = True
if pkg_type == "binary":
if db.bintree.isremote(match):
continue
@@ -1397,7 +1401,7 @@ def action_info(settings, trees, myopts, myfiles):
mypkgs.append((match, pkg_type))
break
- if not any_match:
+ if not cp_exists:
xinfo = '"%s"' % x.unevaluated_atom
# Discard null/ from failed cpv_expand category expansion.
xinfo = xinfo.replace("null/", "")
@@ -1406,8 +1410,7 @@ def action_info(settings, trees, myopts, myfiles):
writemsg("\nemerge: there are no ebuilds to satisfy %s.\n" %
colorize("INFORM", xinfo), noiselevel=-1)
- if not cp_exists and myopts.get(
- "--misspell-suggestions", "y") != "n":
+ if myopts.get("--misspell-suggestions", "y") != "n":
writemsg("\nemerge: searching for similar names..."
, noiselevel=-1)