mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #29261 from attiasr/patch-1
fix incorrect reinstallation of windows pkg
This commit is contained in:
commit
d6aaae8d7b
@ -446,9 +446,15 @@ def install(name=None, refresh=False, pkgs=None, saltenv='base', **kwargs):
|
|||||||
|
|
||||||
version_num = options and options.get('version') or _get_latest_pkg_version(pkginfo)
|
version_num = options and options.get('version') or _get_latest_pkg_version(pkginfo)
|
||||||
|
|
||||||
if version_num in [old.get(pkginfo[x]['full_name']) for x in pkginfo]:
|
if version_num in [old.get(pkg_name) for x in pkginfo]:
|
||||||
# Desired version number already installed
|
# Desired version number already installed
|
||||||
continue
|
log.info('Version {0} is already installed for '
|
||||||
|
'package {1}'.format(version_num, pkg_name))
|
||||||
|
return {
|
||||||
|
pkg_name: {
|
||||||
|
'old': '{0} already installed'.format(version_num)
|
||||||
|
}
|
||||||
|
}
|
||||||
elif version_num not in pkginfo:
|
elif version_num not in pkginfo:
|
||||||
log.error('Version {0} not found for package '
|
log.error('Version {0} not found for package '
|
||||||
'{1}'.format(version_num, pkg_name))
|
'{1}'.format(version_num, pkg_name))
|
||||||
|
Loading…
Reference in New Issue
Block a user