mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #19259 from thepauleh/yum-salt-sources-13197
13197 - pkg.install can use sources for yumpkg
This commit is contained in:
commit
5ad225b4f7
@ -991,17 +991,26 @@ def install(name=None,
|
||||
|
||||
__context__.pop('pkg.list_pkgs', None)
|
||||
new = list_pkgs()
|
||||
|
||||
versionName = pkgname
|
||||
ret = salt.utils.compare_dicts(old, new)
|
||||
|
||||
if sources is not None:
|
||||
versionName = pkgname + '-' + new.get(pkgname, '')
|
||||
if pkgname in ret:
|
||||
ret[versionName] = ret.pop(pkgname)
|
||||
for pkgname in to_reinstall:
|
||||
if not pkgname not in old:
|
||||
ret.update({pkgname: {'old': old.get(pkgname, ''),
|
||||
if not versionName not in old:
|
||||
ret.update({versionName: {'old': old.get(pkgname, ''),
|
||||
'new': new.get(pkgname, '')}})
|
||||
else:
|
||||
if pkgname not in ret:
|
||||
ret.update({pkgname: {'old': old.get(pkgname, ''),
|
||||
if versionName not in ret:
|
||||
ret.update({versionName: {'old': old.get(pkgname, ''),
|
||||
'new': new.get(pkgname, '')}})
|
||||
if ret:
|
||||
__context__.pop('pkg._avail', None)
|
||||
elif sources is not None:
|
||||
ret = {versionName: {}}
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user