[yum-cvs] yum/yum packages.py,1.104,1.105

Seth Vidal skvidal at linux.duke.edu
Tue Jun 26 06:05:17 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv17438/yum

Modified Files:
	packages.py 
Log Message:

make sure that parsePackges(casematch=0) returns correctly for non-globbed
search strings


Index: packages.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/packages.py,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- packages.py	3 Jun 2007 15:29:05 -0000	1.104
+++ packages.py	26 Jun 2007 06:05:15 -0000	1.105
@@ -101,8 +101,20 @@
                     unmatched.append(command)
                     
             else:
-                # we got nada
-                unmatched.append(command)
+                if casematch:
+                    unmatched.append(command)
+                else:
+                    # look for case insensitively
+                    foundit = 0
+                    for item in pkgdict.keys():
+                        if command.lower() == item.lower():
+                            matched.extend(pkgdict[item])
+                            foundit = 1
+                            continue
+
+                    # we got nada
+                    if not foundit:
+                        unmatched.append(command)
 
     matched = misc.unique(matched)
     unmatched = misc.unique(unmatched)




More information about the Yum-cvs-commits mailing list