diff options
Diffstat (limited to 'pym/_emerge')
-rw-r--r-- | 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 7f471170a..a755116ce 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2743,7 +2743,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 @@ -2757,6 +2757,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: @@ -2769,6 +2775,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) |