mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix pkg.upgrade for zypper
This commit is contained in:
parent
9005a87635
commit
6c5807c4be
1 changed files with 4 additions and 3 deletions
|
@ -1120,10 +1120,11 @@ def upgrade(refresh=True, skip_verify=False):
|
|||
refresh_db()
|
||||
old = list_pkgs()
|
||||
|
||||
to_append = ''
|
||||
if skip_verify:
|
||||
to_append = '--no-gpg-checks'
|
||||
__zypper__(systemd_scope=_systemd_scope()).noraise.call('update', '--auto-agree-with-licenses', to_append)
|
||||
__zypper__(systemd_scope=_systemd_scope()).noraise.call('update', '--auto-agree-with-licenses', '--no-gpg-checks')
|
||||
else:
|
||||
__zypper__(systemd_scope=_systemd_scope()).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()
|
||||
|
|
Loading…
Add table
Reference in a new issue