From f8045f45746e21d0b8cd0ef3a89d670bdbe665fa Mon Sep 17 00:00:00 2001 From: M0ses Date: Thu, 2 Apr 2015 19:04:56 +0200 Subject: [PATCH] fix errorhandling in zypper.py module package_latest was calling package_present but did not care about the return code so errors in package_present were hidden and everthing look ok on the console when zypper update did not fail, but no packages where installed. --- packaging/os/zypper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packaging/os/zypper.py b/packaging/os/zypper.py index a6fdc5e7189..8fe2fc57b1a 100644 --- a/packaging/os/zypper.py +++ b/packaging/os/zypper.py @@ -183,6 +183,11 @@ def package_latest(m, name, installed_state, disable_gpg_check, disable_recommen # first of all, make sure all the packages are installed (rc, stdout, stderr, changed) = package_present(m, name, installed_state, disable_gpg_check, disable_recommends, old_zypper) + # return if an error occured while installation + # otherwise error messages will be lost and user doesn`t see any error + if rc: + return (rc, stdout, stderr, changed) + # if we've already made a change, we don't have to check whether a version changed if not changed: pre_upgrade_versions = get_current_version(m, name)