* [gentoo-commits] proj/portage:master commit in: pym/_emerge/
@ 2011-02-28 18:01 99% Zac Medico
0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2011-02-28 18:01 UTC (permalink / raw
To: gentoo-commits
commit: 9ce6da43ab90c4dab97ebf3b8339e5dbc113a0a8
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 28 17:58:27 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 28 17:58:27 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ce6da43
depgraph: case insensitive search for unsatisfied
This will fix bug #356555.
---
pym/_emerge/depgraph.py | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 7e55c77..b9c308b 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2738,7 +2738,7 @@ class depgraph(object):
else:
writemsg_stdout("\nemerge: there are no ebuilds to satisfy "+green(xinfo)+".\n", noiselevel=-1)
if isinstance(myparent, AtomArg):
- cp = myparent.atom.cp
+ cp = myparent.atom.cp.lower()
cat, pkg = portage.catsplit(cp)
if cat == "null":
cat = None
@@ -2752,6 +2752,12 @@ class depgraph(object):
if "--usepkg" in self._frozen_config.myopts:
all_cp.update(bindb.cp_all())
+ orig_cp_map = {}
+ for cp in all_cp:
+ cp_lower = cp.lower()
+ orig_cp_map.setdefault(cp_lower, []).append(cp)
+ all_cp = set(orig_cp_map)
+
if cat:
matches = difflib.get_close_matches(cp, all_cp)
else:
@@ -2764,6 +2770,11 @@ class depgraph(object):
for pkg_match in pkg_matches:
matches.extend(pkg_to_cp[pkg_match])
+ matches_orig_case = []
+ for cp in matches:
+ matches_orig_case.extend(orig_cp_map[cp])
+ matches = matches_orig_case
+
if len(matches) == 1:
writemsg_stdout("\nemerge: Maybe you meant " + matches[0] + "?\n"
, noiselevel=-1)
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2011-02-28 18:01 99% [gentoo-commits] proj/portage:master commit in: pym/_emerge/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox