[Yum-devel] [PATCH 2/2] Non-zero errorlevel when reinstall arg not available. BZ 800285.
Zdeněk Pavlas
zpavlas at redhat.com
Tue Mar 6 12:06:02 UTC 2012
When there's a command with N arguments, the general consent
is that we should try to process all of them, and let the caller
know if any argument has failed.
---
cli.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/cli.py b/cli.py
index b7511f1..b6c86ac 100755
--- a/cli.py
+++ b/cli.py
@@ -1106,6 +1106,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
txmbrs = self.reinstall(pattern=arg)
except yum.Errors.ReinstallRemoveError:
self._checkMaybeYouMeant(arg, always_output=False)
+ self.exit_code = 1
except yum.Errors.ReinstallInstallError, e:
for ipkg in e.failed_pkgs:
xmsg = ''
@@ -1116,6 +1117,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
self.verbose_logger.log(yum.logginglevels.INFO_2, msg,
self.term.MODE['bold'], ipkg,
self.term.MODE['normal'], xmsg)
+ self.exit_code = 1
except yum.Errors.ReinstallError, e:
assert False, "Shouldn't happen, but just in case"
self.verbose_logger.log(yum.logginglevels.INFO_2, e)
--
1.7.4.4
More information about the Yum-devel
mailing list