[yum-cvs] yum-utils/plugins/protectbase protectbase.py,1.1,1.2
Menno Smits
mjs at linux.duke.edu
Fri Jun 16 14:21:26 UTC 2006
Update of /home/groups/yum/cvs/yum-utils/plugins/protectbase
In directory login1.linux.duke.edu:/tmp/cvs-serv2114
Modified Files:
protectbase.py
Log Message:
Updated to use new style option definitions.
Index: protectbase.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/plugins/protectbase/protectbase.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- protectbase.py 17 Jul 2005 02:26:40 -0000 1.1
+++ protectbase.py 16 Jun 2006 14:21:24 -0000 1.2
@@ -4,20 +4,21 @@
repositories even if the non-protected repo has a later version.
This is mainly useful for preventing 3rd party repositories from interfering
-with packages from base, updates, extras and livna.
+with packages from core, updates, extras and livna.
-Enable the plugin and add 'protect=1' to the config of all repos you want to
+Enable the plugin and add 'protect=yes' to the config of all repos you want to
protect.
'''
-from yum.constants import *
from yum.plugins import TYPE_CORE
+from yum import config
-requires_api_version = '2.1'
+requires_api_version = '2.4'
plugin_type = (TYPE_CORE,)
def config_hook(conduit):
- conduit.registerOpt('protect', PLUG_OPT_BOOL, PLUG_OPT_WHERE_REPO, False)
+ config.YumConf.protect = config.BoolOption(False)
+ config.RepoConf.protect = config.Inherit(config.YumConf.protect)
def exclude_hook(conduit):
cnt = 0
More information about the Yum-cvs-commits
mailing list