rpms/yum-utils/devel yum-downloader-archlist.patch,1.1,1.2

Seth Vidal (skvidal) fedora-extras-commits at redhat.com
Fri Mar 7 03:51:48 UTC 2008


Author: skvidal

Update of /cvs/extras/rpms/yum-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13841

Modified Files:
	yum-downloader-archlist.patch 
Log Message:
look it's a better patch, just for jkeating, b/c we love him so.



yum-downloader-archlist.patch:

Index: yum-downloader-archlist.patch
===================================================================
RCS file: /cvs/extras/rpms/yum-utils/devel/yum-downloader-archlist.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- yum-downloader-archlist.patch	6 Mar 2008 20:36:54 -0000	1.1
+++ yum-downloader-archlist.patch	7 Mar 2008 03:51:43 -0000	1.2
@@ -1,8 +1,59 @@
-diff --git a/yumdownloader.py b/yumdownloader.py
-index ebfed81..5252ad4 100755
---- a/yumdownloader.py
-+++ b/yumdownloader.py
-@@ -226,6 +226,8 @@ class YumDownloader(YumUtilBase):
+--- a/yumdownloader.py	2008-03-06 22:48:24.000000000 -0500
++++ b/yumdownloader.py	2008-03-06 14:34:12.000000000 -0500
+@@ -64,9 +64,12 @@
+                 self.logger.error("Error: Could not make cachedir, exiting")
+                 sys.exit(50)
+             self.repos.setCacheDir(cachedir)
+-            # Turn of cache
+-            self.conf.cache = 0
+ 
++            # Turn off cache
++            self.conf.cache = 0
++            # make sure the repos know about it, too
++            self.repos.setCache(0)
++            
+         # Setup yum (Ts, RPM db, Repo & Sack)
+         self.doUtilYumSetup(opts)
+         # Setup source repos
+@@ -116,14 +119,12 @@
+         
+     def downloadPackages(self,opts):
+         
+-        avail = self.pkgSack.returnPackages()
+-    
+         toDownload = []
+     
+         packages = self.cmds
+         for pkg in packages:
+             toActOn = []
+-            exactmatch, matched, unmatched = parsePackages(avail, [pkg])
++            exactmatch, matched, unmatched = parsePackages(self.pkgSack.returnPackages(), [pkg])
+             installable = yum.misc.unique(exactmatch + matched)
+             if len(unmatched) > 0: # if we get back anything in unmatched, it fails
+                 self.logger.error('No Match for argument %s' % pkg)
+@@ -160,7 +161,7 @@
+                     toDownload.extend(self.bestPackagesFromList(toActOn, 'src'))
+                 else:
+                     toDownload.extend(self.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
+@@ -215,18 +216,18 @@
+                                    size=os.stat(path).st_size)
+                     shutil.copy2(path, local)
+                     progress.end(progress.size) 
+-   
++            
+     # sligly modified from the one in YumUtilBase    
+     def doUtilYumSetup(self,opts):
+         """do a default setup for all the normal/necessary yum components,
+            really just a shorthand for testing"""
+         try:
+-            self._getTs()
+-            self._getRpmDB()
+             self._getRepos()
              # if '--source' is used the add src to the archlist
              if opts.source:
                  archlist = rpmUtils.arch.getArchList() + ['src']    
@@ -11,7 +62,7 @@
              else:
                  archlist = rpmUtils.arch.getArchList()
              self._getSacks(archlist=archlist)
-@@ -250,7 +252,8 @@ class YumDownloader(YumUtilBase):
+@@ -251,7 +252,8 @@
            help='resolve dependencies and download required packages')
          parser.add_option("--source", default=False, dest="source", action="store_true",
            help='operate on source packages')
@@ -20,4 +71,4 @@
 +          help="only download packages of certain architecture(s)")        
  if __name__ == '__main__':
      util = YumDownloader()
-         
\ No newline at end of file
+         




More information about the fedora-extras-commits mailing list