Merge pull request #19259 from thepauleh/yum-salt-sources-13197

13197 - pkg.install can use sources for yumpkg
This commit is contained in:
Thomas S Hatch 2014-12-29 15:43:06 -07:00
commit 5ad225b4f7

View File

@ -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