[yum-cvs] yum cli.py,1.179,1.180
Menno Smits
mjs at login.linux.duke.edu
Sun May 8 03:05:39 UTC 2005
Update of /home/groups/yum/cvs/yum
In directory login:/tmp/cvs-serv31523
Modified Files:
cli.py
Log Message:
Added --noplugins command line option.
Index: cli.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/cli.py,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- cli.py 5 May 2005 10:35:19 -0000 1.179
+++ cli.py 8 May 2005 03:05:37 -0000 1.180
@@ -142,12 +142,17 @@
self.optparser.add_option("", "--obsoletes", dest="obsoletes",
default=False, action="store_true",
help="enable obsoletes processing during updates")
-
+ self.optparser.add_option("", "--noplugins", dest="noplugins",
+ default=False, action="store_true",
+ help="disable Yum plugins")
# Parse only command line options that affect basic yum setup
try:
- args = _filtercmdline([], ['-c', '-d', '-e', '--installroot'],
- args)
+ args = _filtercmdline(
+ ('--noplugins',),
+ ('-c', '-d', '-e', '--installroot'),
+ args,
+ )
except ValueError:
self.usage()
sys.exit(1)
@@ -188,8 +193,10 @@
self.usage()
sys.exit(1)
- # Initialise plugins (this may add extra command line options)
- self.doPluginSetup(self.optparser)
+ # Initialise plugins if cmd line and config file say these should be in
+ # use (this may add extra command line options)
+ if not opts.noplugins and self.conf.plugins:
+ self.doPluginSetup(self.optparser)
# Now parse the command line for real
(opts, self.cmds) = self.optparser.parse_args()
@@ -1455,8 +1462,8 @@
the optparse module. This is useful when some options affect what other
options should be available.
- @param novalopts: A list of options to keep that don't take an argument.
- @param valopts: A list options to keep that take a single argument.
+ @param novalopts: A sequence of options to keep that don't take an argument.
+ @param valopts: A sequence of options to keep that take a single argument.
@param args: The command line arguments to parse (as per sys.argv[:1]
@return: A list of strings containing the filtered version of args.
More information about the Yum-cvs-commits
mailing list