From: Zac Medico Date: Mon, 31 Jan 2011 23:44:55 +0000 (-0800) Subject: depgraph: display 'searching for similar names' X-Git-Tag: v2.1.9.36~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0dacaf0ad0d05c6c6f5c97d044cade22f6a04a3e;p=portage.git depgraph: display 'searching for similar names' It can take few seconds to search, so display a status message. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 0c56e35ef..99d481031 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2623,6 +2623,9 @@ class depgraph(object): if cat == "null": cat = None + writemsg_stdout("\nemerge: searching for similar names..." + , noiselevel=-1) + all_cp = set() all_cp.update(vardb.cp_all()) all_cp.update(portdb.cp_all()) @@ -2642,12 +2645,17 @@ class depgraph(object): matches.extend(pkg_to_cp[pkg_match]) if len(matches) == 1: - writemsg_stdout("emerge: Maybe you meant " + matches[0] + "?\n" + writemsg_stdout("\nemerge: Maybe you meant " + matches[0] + "?\n" , noiselevel=-1) elif len(matches) > 1: - writemsg_stdout("emerge: Maybe you meant any of these: " + ", ".join(matches) + "?\n" + writemsg_stdout( + "\nemerge: Maybe you meant any of these: %s?\n" % \ + (", ".join(matches),), noiselevel=-1) + else: + # Generally, this would only happen if + # all dbapis are empty. + writemsg_stdout(" nothing similar found.\n" , noiselevel=-1) - msg = [] if not isinstance(myparent, AtomArg): # It's redundant to show parent for AtomArg since