[yum-cvs] yum/yum plugins.py,1.31,1.32
Menno Smits
mjs at linux.duke.edu
Tue Sep 26 13:25:00 UTC 2006
Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv4939/yum
Modified Files:
plugins.py
Log Message:
Committed Bastiaan Bakker's command extension patch. I made a few bug fixes to
it.
Index: plugins.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/plugins.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- plugins.py 5 Sep 2006 17:57:04 -0000 1.31
+++ plugins.py 26 Sep 2006 13:24:58 -0000 1.32
@@ -33,7 +33,6 @@
# SQL db)
# TODO: consistent case of YumPlugins methods
# TODO: allow plugins to extend shell commands
-# TODO: allow plugins to extend commands (on the command line)
# TODO: allow plugins to define new repository types
# TODO: More developer docs: use epydoc as API begins to stablise
@@ -52,7 +51,7 @@
# API, the major version number must be incremented and the minor version number
# reset to 0. If a change is made that doesn't break backwards compatibility,
# then the minor number must be incremented.
-API_VERSION = '2.4'
+API_VERSION = '2.5'
class DeprecatedInt(int):
'''
@@ -398,6 +397,13 @@
setattr(config.YumConf, name, option)
setattr(config.RepoConf, name, config.Inherit(option))
+ def registerCommand(self, command):
+ if hasattr(self._base, 'registerCommand'):
+ self._base.registerCommand(command)
+ else:
+ raise Errors.ConfigError('registration of commands not supported')
+
+
class InitPluginConduit(PluginConduit):
def getConf(self):
More information about the Yum-cvs-commits
mailing list