[yum-commits] Branch 'yum-3_2_X' - 2 commits - cli.py
James Antill
james at osuosl.org
Fri Oct 17 19:23:28 UTC 2008
cli.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 30287d11e450cfab55d8e3db127ec1fe02de392e
Author: David Cantrell <dcantrell at redhat.com>
Date: Fri Oct 17 15:23:06 2008 -0400
Allow sys.argv to be overridden by "clever" callers, fixes bug 465653
diff --git a/cli.py b/cli.py
index ec93f83..ff4c7d6 100644
--- a/cli.py
+++ b/cli.py
@@ -195,7 +195,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# Now parse the command line for real and
# apply some of the options to self.conf
- (opts, self.cmds) = self.optparser.setupYumConfig()
+ (opts, self.cmds) = self.optparser.setupYumConfig(args=args)
if opts.version:
self.conf.cache = 1
@@ -1045,9 +1045,12 @@ class YumOptionParser(OptionParser):
ret.extend(arg.replace(",", " ").split())
return ret
- def setupYumConfig(self):
+ def setupYumConfig(self, args=None):
# Now parse the command line for real
- (opts, cmds) = self.parse_args()
+ if args is not None:
+ (opts, cmds) = self.parse_args()
+ else:
+ (opts, cmds) = self.parse_args(args=args)
# Let the plugins know what happened on the command line
self.base.plugins.setCmdLine(opts, cmds)
commit 8131658aa335360192037035d9fd4c098e3c5a92
Author: James Antill <james at and.org>
Date: Fri Oct 17 13:15:48 2008 -0400
Don't show the 3.0.x provides warning for full path names
diff --git a/cli.py b/cli.py
index c317971..ec93f83 100644
--- a/cli.py
+++ b/cli.py
@@ -768,7 +768,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if len(matching) == 0:
for arg in args:
- if '*' in arg:
+ if '*' in arg or (arg and arg[0] == '/'):
continue
self.logger.warning(_('Warning: 3.0.x versions of yum would erronously match against filenames.\n You can use "%s*/%s%s" and/or "%s*bin/%s%s" to get that behaviour'),
self.term.MODE['bold'], arg,
More information about the Yum-commits
mailing list