[yum-cvs] yum cli.py,1.263,1.264

Seth Vidal skvidal at linux.duke.edu
Wed Apr 25 22:51:51 UTC 2007


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

Modified Files:
	cli.py 
Log Message:
setup caching at the right place in yum-cli. If the conf object is already  
done and the repos have been touched then we won't be able to set caching   
mode later. This prevents a silent exit if we're running as user



Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -r1.263 -r1.264
--- cli.py	19 Apr 2007 08:37:02 -0000	1.263
+++ cli.py	25 Apr 2007 22:51:49 -0000	1.264
@@ -173,9 +173,6 @@
         except CliError:
             sys.exit(1)
     
-        # set our caching mode correctly
-        if self.conf.uid != 0:
-            self.conf.cache = 1
         # run the sleep - if it's unchanged then it won't matter
         time.sleep(sleeptime)
         
@@ -1109,8 +1106,9 @@
             # Handle remaining options
             if opts.assumeyes:
                 self.base.conf.assumeyes =1
-
-            if opts.cacheonly:
+            # seems a good place for it - to go back to yum 3.0.X behavior
+            # if not root then caching is enabled
+            if opts.cacheonly or self.base.conf.uid != 0:
                 self.base.conf.cache = 1
 
             if opts.obsoletes:




More information about the Yum-cvs-commits mailing list