emerge: skip misspell suggestion if cp exists
authorZac Medico <zmedico@gentoo.org>
Mon, 2 May 2011 19:54:54 +0000 (12:54 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 4 May 2011 19:54:08 +0000 (12:54 -0700)
pym/_emerge/depgraph.py

index 8750a18e93109c5d04355d17a597b9a3bd6a9fe8..b230635aa1d8f5b16acf6c53b001f75305f3beeb 100644 (file)
@@ -2792,8 +2792,16 @@ class depgraph(object):
                        writemsg_stdout("\n", noiselevel=-1)
                        mask_docs = True
                else:
+                       cp_exists = False
+                       if not atom.cp.startswith("null/"):
+                               for pkg in self._iter_match_pkgs_any(
+                                       root_config, Atom(atom.cp)):
+                                       cp_exists = True
+                                       break
+
                        writemsg_stdout("\nemerge: there are no ebuilds to satisfy "+green(xinfo)+".\n", noiselevel=-1)
                        if isinstance(myparent, AtomArg) and \
+                               not cp_exists and \
                                self._frozen_config.myopts.get(
                                "--misspell-suggestions", "y") != "n":
                                cp = myparent.atom.cp.lower()