[yum-git] yumdownloader.py

Seth Vidal skvidal at linux.duke.edu
Fri Mar 7 16:04:15 UTC 2008


 yumdownloader.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 24bda39fa547dafff3177a435bf5ca86c0529cac
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Fri Mar 7 11:02:20 2008 -0500

    make sure noarch and other sub-arch downloads still work
    with --archlist

diff --git a/yumdownloader.py b/yumdownloader.py
index 5252ad4..e4d4d6b 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -26,6 +26,7 @@ from urlparse import urljoin
 from urlgrabber.progress import TextMeter
 import shutil
 
+import rpmUtils
 
 class YumDownloader(YumUtilBase):
     NAME = 'yumdownloader'
@@ -159,6 +160,9 @@ class YumDownloader(YumUtilBase):
             if toActOn:
                 if opts.source:
                     toDownload.extend(self.bestPackagesFromList(toActOn, 'src'))
+                elif opts.archlist:
+                    for arch in opts.archlist.split(','):
+                        toDownload.extend(self.bestPackagesFromList(toActOn, arch))
                 else:
                     toDownload.extend(self.bestPackagesFromList(toActOn))
                     
@@ -227,7 +231,9 @@ class YumDownloader(YumUtilBase):
             if opts.source:
                 archlist = rpmUtils.arch.getArchList() + ['src']    
             elif opts.archlist:
-                archlist = opts.archlist.split(',')                
+                archlist = []
+                for a in opts.archlist.split(','):
+                    archlist.extend(rpmUtils.arch.getArchList(a))
             else:
                 archlist = rpmUtils.arch.getArchList()
             self._getSacks(archlist=archlist)



More information about the Yum-cvs-commits mailing list