[yum-commits] Branch 'yum-3_2_X' - cli.py
James Antill
james at osuosl.org
Wed Nov 10 15:29:35 UTC 2010
cli.py | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 73c745d69f5316b34ef246c2e5411fbe0dd5c74f
Author: James Antill <james at and.org>
Date: Wed Nov 10 09:14:47 2010 -0500
Warn about merged options used in firstParse() (-c, -d, -e, -q, -v).
diff --git a/cli.py b/cli.py
index e8748f2..0c5d8ed 100644
--- a/cli.py
+++ b/cli.py
@@ -250,6 +250,17 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# apply some of the options to self.conf
(opts, self.cmds) = self.optparser.setupYumConfig(args=args)
+ # Check that firstParse didn't miss anything, and warn the user if it
+ # did ... because this is really magic, and unexpected.
+ if opts.quiet:
+ opts.debuglevel = 0
+ if opts.verbose:
+ opts.debuglevel = opts.errorlevel = 6
+ if opts.debuglevel != pc.debuglevel or opts.errorlevel != pc.errorlevel:
+ self.logger.warning("Ignored option -q, -v, -d or -e (probably due to merging: -yq != -y -q)")
+ if opts.conffile != pc.fn:
+ self.logger.warning("Ignored option -c (probably due to merging -yc != -y -c)")
+
if opts.version:
self.conf.cache = 1
yum_progs = self.run_with_package_names
More information about the Yum-commits
mailing list