File 0021-Fix-pkg.upgrade-for-zypper.patch of Package salt

From 2cac0c3839af12b0a474f4cb0c0854995cd8dc2a Mon Sep 17 00:00:00 2001
From: "C. R. Oldham" <cro@ncbt.org>
Date: Wed, 21 Sep 2016 20:05:33 -0600
Subject: [PATCH 21/21] Fix pkg.upgrade for zypper

---
 salt/modules/zypper.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index 4bb9a09..21b87b0 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -1079,10 +1079,11 @@ def upgrade(refresh=True, skip_verify=False):
         refresh_db()
     old = list_pkgs()
 
-    to_append = ''
     if skip_verify:
-        to_append = '--no-gpg-checks'
-    __zypper__.noraise.call('update', '--auto-agree-with-licenses', to_append)
+        __zypper__.noraise.call('update', '--auto-agree-with-licenses', '--no-gpg-checks')
+    else:
+        __zypper__.noraise.call('update', '--auto-agree-with-licenses')
+
     if __zypper__.exit_code not in __zypper__.SUCCESS_EXIT_CODES:
         ret['result'] = False
         ret['comment'] = (__zypper__.stdout() + os.linesep + __zypper__.stderr()).strip()
-- 
2.10.0

openSUSE Build Service is sponsored by