Merge pull request #29261 from attiasr/patch-1

fix incorrect reinstallation of windows pkg
This commit is contained in:
Mike Place 2015-11-30 11:28:42 -07:00
commit d6aaae8d7b

View File

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