[yum-commits] Branch 'yum-3_2_X' - cli.py

James Antill james at osuosl.org
Mon Jan 10 14:00:31 UTC 2011


 cli.py |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit c0eb012fd5018ca9dacb22987304dc93b4a70473
Author: James Antill <james at and.org>
Date:   Fri Jan 7 16:39:19 2011 -0500

    Fix searching to be more DWIM, again, again, again... test: "kvm manager"

diff --git a/cli.py b/cli.py
index 06bfb68..7c12f43 100644
--- a/cli.py
+++ b/cli.py
@@ -1023,8 +1023,15 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
             matching = []
 
         for (po, keys, matched_value) in matching:
-            if len(keys) <= len(mkeys) or po in pos:
-                continue # Don't print stuff from N/S...
+            #  Don't print matches for "a", "b", "c" on N+S+D when we already
+            # matched that on just N+S.
+            if len(keys) <= len(mkeys):
+                continue
+             #  Just print the highest level of full matches, when we did
+             # minimal matches. Ie. "A", "B" match N+S, just print the
+             # "A", "B", "C", "D" full match, and not the "B", "C", "D" matches.
+            if mkeys and len(keys) < len(okeys):
+                continue
 
             if keys != okeys:
                 if akeys:


More information about the Yum-commits mailing list