From 1e15b8ddda75d138e9f59950d00478d476fd0dfe Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 7 Dec 2012 17:49:27 -0800 Subject: emerge --info: don't error for existing packages This will fix bug #446358. --- pym/_emerge/actions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index d0c3e23db..fcaa2c1cc 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1366,14 +1366,14 @@ def action_info(settings, trees, myopts, myfiles): portdb = trees[eroot]['porttree'].dbapi bindb = trees[eroot]["bintree"].dbapi for x in myfiles: - match_found = False + any_match = False cp_exists = False installed_match = vardb.match(x) for installed in installed_match: mypkgs.append((installed, "installed")) - match_found = True + any_match = True - if match_found: + if any_match: continue for db, pkg_type in ((portdb, "ebuild"), (bindb, "binary")): @@ -1386,6 +1386,7 @@ def action_info(settings, trees, myopts, myfiles): matches = db.match(x) matches.reverse() for match in matches: + any_match = True if pkg_type == "binary": if db.bintree.isremote(match): continue @@ -1394,10 +1395,9 @@ def action_info(settings, trees, myopts, myfiles): if metadata["EAPI"] not in ("0", "1", "2", "3") and \ "info" in metadata["DEFINED_PHASES"].split(): mypkgs.append((match, pkg_type)) - match_found = True break - if not match_found: + if not any_match: xinfo = '"%s"' % x.unevaluated_atom # Discard null/ from failed cpv_expand category expansion. xinfo = xinfo.replace("null/", "") -- cgit v1.2.3-1-g7c22