mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Properly aggregate version when passed with name
This fixes an issue in which states which contained a single package name (no "pkgs" or "sources") paired with a "version" argument, were having the version ignored. This is because just the name was being added to the aggregated "pkgs". Since we're munging low data to aggregate states, this bug wouldn't even result in the state failing if a different version were installed.
This commit is contained in:
parent
62d76f50fc
commit
0055fda3e9
@ -2431,9 +2431,11 @@ def mod_aggregate(low, chunks, running):
|
||||
pkgs.extend(chunk['pkgs'])
|
||||
chunk['__agg__'] = True
|
||||
elif 'name' in chunk:
|
||||
pkgs.append(chunk['name'])
|
||||
if 'version' in chunk:
|
||||
pkgs.append({chunk['name']: chunk['version']})
|
||||
else:
|
||||
pkgs.append(chunk['name'])
|
||||
chunk['__agg__'] = True
|
||||
|
||||
if pkg_type is not None and pkgs:
|
||||
if pkg_type in low:
|
||||
low[pkg_type].extend(pkgs)
|
||||
|
Loading…
Reference in New Issue
Block a user