[yum-cvs] yum/yum __init__.py,1.269,1.270 config.py,1.110,1.111

James Bowes jbowes at linux.duke.edu
Wed Jan 31 01:26:35 UTC 2007


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

Modified Files:
	__init__.py config.py 
Log Message:
Add a fallback to the old default locations for config stuff

Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -r1.269 -r1.270
--- __init__.py	27 Jan 2007 03:04:49 -0000	1.269
+++ __init__.py	31 Jan 2007 01:26:33 -0000	1.270
@@ -109,6 +109,13 @@
         @param errorlevel: Error level to use for logging. If None, the debug
             level will be read from the configuration file.
         '''
+
+        # TODO: Remove this block when we no longer support configs outside
+        # of /etc/yum/
+        if fn == '/etc/yum/yum.conf' and not os.path.exists(fn):
+            # Try the old default
+            fn = '/etc/yum.conf'
+
         startupconf = config.readStartupConfig(fn, root)
 
         if debuglevel != None:

Index: config.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/config.py,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- config.py	27 Jan 2007 03:04:49 -0000	1.110
+++ config.py	31 Jan 2007 01:26:33 -0000	1.111
@@ -476,7 +476,7 @@
     cachedir = Option('/var/cache/yum')
     keepcache = BoolOption(True)
     logfile = Option('/var/log/yum.log')
-    reposdir = ListOption(['/etc/yum/repos.d'])
+    reposdir = ListOption(['/etc/yum/repos.d', '/etc/yum.repos.d'])
     syslog_ident = Option()
     syslog_facility = Option('LOG_DAEMON')
 




More information about the Yum-cvs-commits mailing list