[Yum-devel] [PATCH] Add an archlist option.

Jesse Keating jkeating at redhat.com
Wed Mar 5 19:53:42 UTC 2008


This option will allow yumdownloader to download packages of a
specific arch or list of arches, instead of just the arch of the
machine running the command.
---
 yumdownloader.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/yumdownloader.py b/yumdownloader.py
index ebfed81..d9f446a 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -226,6 +226,8 @@ class YumDownloader(YumUtilBase):
             # if '--source' is used the add src to the archlist
             if opts.source:
                 archlist = rpmUtils.arch.getArchList() + ['src']    
+            elif opts.archlist:
+                archlist = opts.archlist.split(',')
             else:
                 archlist = rpmUtils.arch.getArchList()
             self._getSacks(archlist=archlist)
@@ -250,6 +252,9 @@ class YumDownloader(YumUtilBase):
           help='resolve dependencies and download required packages')
         parser.add_option("--source", default=False, dest="source", action="store_true",
           help='operate on source packages')
+        parser.add_option("--archlist",
+          help="only download packages of certain architecture(s)")
+
         
 if __name__ == '__main__':
     util = YumDownloader()
-- 
1.5.4.3




More information about the Yum-devel mailing list