[yum-cvs] yum/yum __init__.py,1.116,1.117 plugins.py,1.11,1.12

Menno Smits mjs at login.linux.duke.edu
Sun May 8 03:05:40 UTC 2005


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

Modified Files:
	__init__.py plugins.py 
Log Message:
Added --noplugins command line option.


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- __init__.py	5 May 2005 10:35:19 -0000	1.116
+++ __init__.py	8 May 2005 03:05:37 -0000	1.117
@@ -142,7 +142,7 @@
         doConfigSetup() has been called.
         '''
         # Load plugins first as they make affect available config options
-        self.plugins = plugins.YumPlugins(self, optparser)
+        self.plugins = plugins.YumPlugins(self, self.conf.pluginpath, optparser)
 
         # Process options registered by plugins
         self.plugins.parseopts(self.conf, self.repos.findRepos('*'))

Index: plugins.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/plugins.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- plugins.py	7 May 2005 04:24:08 -0000	1.11
+++ plugins.py	8 May 2005 03:05:37 -0000	1.12
@@ -22,9 +22,6 @@
 import config 
 import Errors
 
-# TODO: cmdline option to disable plugins "--noplugins" (for support problems)
-#   - document
-
 # TODO: should plugin searchpath be affected by installroot option?
 
 # TODO: better handling of PluginYumExit
@@ -105,9 +102,8 @@
 
 class YumPlugins:
 
-    def __init__(self, base, optparser=None):
-        self.enabled = base.conf.plugins
-        self.searchpath = base.conf.pluginpath
+    def __init__(self, base, searchpath, optparser=None):
+        self.searchpath = searchpath
         self.base = base
         self.optparser = optparser
         self.cmdline = (None, None)
@@ -125,9 +121,6 @@
     def run(self, slotname, **kwargs):
         '''Run all plugin functions for the given slot.
         '''
-        if not self.enabled:
-            return
-       
         # Determine handler class to use
         if slotname == 'config':
             conduitcls = ConfigPluginConduit
@@ -156,9 +149,6 @@
 
     def _importplugins(self):
 
-        if not self.enabled:
-            return 0
-
         # Initialise plugin dict
         self._plugins = {}
         self._pluginfuncs = {}
@@ -295,6 +285,9 @@
     def run(self, *args, **kwargs):
         pass
 
+    def setCmdLine(self, *args, **kwargs):
+        pass
+
 class PluginConduit:
     def __init__(self, parent, base, conf):
         self._parent = parent




More information about the Yum-cvs-commits mailing list