[yum-cvs] yum-utils yumdownloader.py,1.8,1.9

Seth Vidal skvidal at linux.duke.edu
Sun May 7 01:36:54 UTC 2006


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

Modified Files:
	yumdownloader.py 
Log Message:

fix multiple packages specified on cli


Index: yumdownloader.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/yumdownloader.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- yumdownloader.py	11 Apr 2006 06:25:51 -0000	1.8
+++ yumdownloader.py	7 May 2006 01:36:52 -0000	1.9
@@ -93,23 +93,27 @@
     my.doSackSetup(archlist=archlist)
 
     avail = my.pkgSack.returnPackages()
+
     toDownload = []
 
     packages = args
     for pkg in packages:
+        toActOn = []
         exactmatch, matched, unmatched = parsePackages(avail, [pkg])
         installable = yum.misc.unique(exactmatch + matched)
         if len(unmatched) > 0: # if we get back anything in unmatched, it fails
             my.errorlog(0, 'No Match for argument %s' % pkg)
             continue
         for newpkg in installable:
-            toDownload.append(newpkg)
-
-    if opts.source:
-        toDownload = my.bestPackagesFromList(toDownload, 'src')
-    else:
-        toDownload = my.bestPackagesFromList(toDownload)
+            toActOn.append(newpkg)
         
+
+        if toActOn:
+            if opts.source:
+                toDownload.extend(my.bestPackagesFromList(toActOn, 'src'))
+            else:
+                toDownload.extend(my.bestPackagesFromList(toActOn))
+    
     # If the user supplies to --resolve flag, resolve dependencies for
     # all packages
     # note this might require root access because the headers need to be




More information about the Yum-cvs-commits mailing list