[yum-cvs] yum/yum __init__.py,1.321,1.322 plugins.py,1.37,1.38
Seth Vidal
skvidal at linux.duke.edu
Tue Apr 24 20:06:02 UTC 2007
Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv8718
Modified Files:
__init__.py plugins.py
Log Message:
add a postconfig hook to the plugin architecture
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.321
retrieving revision 1.322
diff -u -r1.321 -r1.322
--- __init__.py 20 Apr 2007 09:58:36 -0000 1.321
+++ __init__.py 24 Apr 2007 20:06:00 -0000 1.322
@@ -145,6 +145,8 @@
startupconf.pluginconfpath)
self._conf = config.readMainConfig(startupconf)
+ # run the postconfig plugin hook
+ self.plugins.run('postconfig')
self.yumvar = self.conf.yumvar
self.getReposFromConfig()
Index: plugins.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/plugins.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- plugins.py 28 Mar 2007 15:59:46 -0000 1.37
+++ plugins.py 24 Apr 2007 20:06:00 -0000 1.38
@@ -70,6 +70,7 @@
# Mapping of slots to conduit classes
SLOT_TO_CONDUIT = {
'config': 'ConfigPluginConduit',
+ 'postconfig': 'PostConfigPluginConduit',
'init': 'InitPluginConduit',
'predownload': 'DownloadPluginConduit',
'postdownload': 'DownloadPluginConduit',
@@ -412,7 +413,11 @@
else:
raise Errors.ConfigError('registration of commands not supported')
-
+class PostConfigPluginConduit(ConfigPluginConduit):
+
+ def getConf(self):
+ return self._base.conf
+
class InitPluginConduit(PluginConduit):
def getConf(self):
More information about the Yum-cvs-commits
mailing list