[Yum-devel] [PATCH] Warn about merged options used in firstParse() (-c, -d, -e, -q, -v).
seth vidal
skvidal at fedoraproject.org
Wed Nov 10 14:53:17 UTC 2010
On Wed, 2010-11-10 at 09:14 -0500, James Antill wrote:
> ---
> cli.py | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> 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
ACK
-sv
More information about the Yum-devel
mailing list