[yum-cvs] yum/yum __init__.py,1.340,1.341 config.py,1.123,1.124

Seth Vidal skvidal at linux.duke.edu
Wed Jul 4 21:39:38 UTC 2007


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

Modified Files:
	__init__.py config.py 
Log Message:

- move around where we get the config file age out of __init__ and into config
- add the path to the config file into the config data for walking back from
it for writing out our configs


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.340
retrieving revision 1.341
diff -u -r1.340 -r1.341
--- __init__.py	4 Jul 2007 13:44:01 -0000	1.340
+++ __init__.py	4 Jul 2007 21:39:36 -0000	1.341
@@ -156,7 +156,7 @@
         # run the postconfig plugin hook
         self.plugins.run('postconfig')
         self.yumvar = self.conf.yumvar
-        self.conf.config_file_age = os.stat(fn)[8]
+
         self.getReposFromConfig()
 
         # who are we:

Index: config.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/config.py,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- config.py	2 Jul 2007 19:40:25 -0000	1.123
+++ config.py	4 Jul 2007 21:39:36 -0000	1.124
@@ -459,7 +459,7 @@
 
     distroverpkg = Option('redhat-release')
     installroot = Option('/')
-
+    config_file_path = Option('/etc/yum/yum.conf')
     plugins = BoolOption(False)
     pluginpath = ListOption(['/usr/share/yum-plugins', '/usr/lib/yum-plugins'])
     pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
@@ -570,7 +570,7 @@
 
     StartupConf.installroot.default = root
     startupconf = StartupConf()
-
+    startupconf.config_file_path = configfile
     parser = ConfigParser()
     confpp_obj = ConfigPreProcessor(configfile)
     try:
@@ -618,6 +618,10 @@
     yumconf.cache = 0
     yumconf.progess_obj = None
     
+    # items related to the originating config file
+    yumconf.config_file_path = startupconf.config_file_path
+    yumconf.config_file_age = os.stat(startupconf.config_file_path)[8]
+    
     # propagate the debuglevel and errorlevel values:
     yumconf.debuglevel = startupconf.debuglevel
     yumconf.errorlevel = startupconf.errorlevel




More information about the Yum-cvs-commits mailing list