mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Fix: zypper handling of multiple version packages
For kernel packages, zypper reports multiple versions as "new" during upgrade. Thus, a salt state requesting pkg.latest of any kernel package would fail, even though zypper runs successfully. This commit provides a simple fix.
This commit is contained in:
parent
b136b15330
commit
5f952007f6
@ -1068,6 +1068,12 @@ def install(name=None,
|
|||||||
|
|
||||||
__context__.pop('pkg.list_pkgs', None)
|
__context__.pop('pkg.list_pkgs', None)
|
||||||
new = list_pkgs()
|
new = list_pkgs()
|
||||||
|
|
||||||
|
# Handle packages which report multiple new versions
|
||||||
|
# (affects only kernel packages at this point)
|
||||||
|
for pkg in new:
|
||||||
|
new[pkg] = new[pkg].split(',')[-1]
|
||||||
|
|
||||||
ret = salt.utils.compare_dicts(old, new)
|
ret = salt.utils.compare_dicts(old, new)
|
||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
|
Loading…
Reference in New Issue
Block a user