mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #29261 from attiasr/patch-1
fix incorrect reinstallation of windows pkg
This commit is contained in:
commit
d6aaae8d7b
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
||||
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
|
||||
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:
|
||||
log.error('Version {0} not found for package '
|
||||
'{1}'.format(version_num, pkg_name))
|
||||
|
|
Loading…
Add table
Reference in a new issue