[yum-cvs] yum-utils yumdownloader.py,1.5,1.6

Panu Matilainen pmatilai at login.linux.duke.edu
Mon Nov 28 16:45:20 UTC 2005


Update of /home/groups/yum/cvs/yum-utils
In directory login:/tmp/cvs-serv22478

Modified Files:
	yumdownloader.py 
Log Message:
- add support for private cache to yumdownloader


Index: yumdownloader.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/yumdownloader.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- yumdownloader.py	1 Jun 2005 06:24:54 -0000	1.5
+++ yumdownloader.py	28 Nov 2005 16:45:18 -0000	1.6
@@ -25,6 +25,7 @@
 from urlgrabber.progress import TextMeter
 from yum.logger import Logger
 from yum.packages import parsePackages, returnBestPackages
+from yum.misc import getCacheDir
 from optparse import OptionParser
 from urlparse import urljoin
 
@@ -33,7 +34,11 @@
     my.doConfigSetup()
     my.conf.setConfigOption('uid', os.geteuid())
     if my.conf.getConfigOption('uid') != 0:
-        my.conf.setConfigOption('cache', 1)
+        cachedir = getCacheDir()
+        if cachedir is None:
+            print "Error: Could not make cachedir, exiting"
+            sys.exit(50)
+        my.repos.setCacheDir(cachedir)
     my.repos.setProgressBar(TextMeter(fo=sys.stdout))
     my.log = Logger(threshold=my.conf.getConfigOption('debuglevel'), 
     file_object =sys.stdout)




More information about the Yum-cvs-commits mailing list