[yum-commits] cli.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Tue Mar 6 16:01:26 UTC 2012
cli.py | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 8b191303679127246842c9c80f42eb56c416cd5c
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Tue Mar 6 16:57:05 2012 +0100
exit(1) when all downgrade args are bad.
diff --git a/cli.py b/cli.py
index 0ccb98e..afa7447 100755
--- a/cli.py
+++ b/cli.py
@@ -1057,6 +1057,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
oldcount = len(self.tsInfo)
+ done = False
for arg in userlist:
if (arg.endswith('.rpm') and (yum.misc.re_remote_url(arg) or
os.path.exists(arg))):
@@ -1072,9 +1073,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.term.MODE['bold'], arg,
self.term.MODE['normal'])
self._maybeYouMeant(arg)
+ else:
+ done = True
if len(self.tsInfo) > oldcount:
change = len(self.tsInfo) - oldcount
return 2, [P_('%d package to downgrade', '%d packages to downgrade', change) % change]
+
+ if not done:
+ return 1, [_('Nothing to do')]
return 0, [_('Nothing to do')]
def reinstallPkgs(self, userlist):
More information about the Yum-commits
mailing list