mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #45369 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
This commit is contained in:
commit
dbe21b2c0d
@ -4,3 +4,19 @@ Salt 2016.11.9 Release Notes
|
||||
|
||||
Version 2016.11.9 is a bugfix release for :ref:`2016.11.0 <release-2016-11-0>`.]
|
||||
|
||||
|
||||
Windows
|
||||
=======
|
||||
Execution module pkg
|
||||
--------------------
|
||||
Significate changes (PR #43708, damon-atkins) have been made to the pkg execution module. Users should test this release against their existing package sls definition files.
|
||||
|
||||
- ``pkg.list_available`` no longer defaults to refreshing the winrepo meta database.
|
||||
- ``pkg.install`` without a ``version`` parameter no longer upgrades software if the software is already installed. Use ``pkg.install version=latest`` or in a state use ``pkg.latest`` to get the old behavior.
|
||||
- Documentation was update for the execution module to match the style in new versions, some corrections as well.
|
||||
- All install/remove commands are prefix with cmd.exe shell and cmdmod is called with a command line string instead of a list. Some sls files in saltstack/salt-winrepo-ng expected the commands to be prefixed with cmd.exe (i.e. the use of ``&``).
|
||||
- Some execution module functions results, now behavour more like their Unix/Linux versions.
|
||||
Execution module cmdmod
|
||||
--------------------
|
||||
Windows cmdmod forcing cmd to be a list (issue #43522) resolved by "cmdmod: Don't list-ify string commands on Windows" PR #43807. Linux/Unix OS command & arguments requires a list. Windows was being treated the same. Windows requires commands & arguments to be a string, which this PR fixes.
|
||||
|
||||
|
@ -156,7 +156,7 @@ def latest_version(*names, **kwargs):
|
||||
# check, whether latest available version
|
||||
# is newer than latest installed version
|
||||
if compare_versions(ver1=six.text_type(latest_available),
|
||||
oper=six.text_type('>'),
|
||||
oper='>',
|
||||
ver2=six.text_type(latest_installed)):
|
||||
log.debug('Upgrade of {0} from {1} to {2} '
|
||||
'is available'.format(name,
|
||||
@ -1131,7 +1131,10 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
||||
version_num = six.text_type(version_num)
|
||||
|
||||
if not version_num:
|
||||
# following can be version number or latest
|
||||
# following can be version number or latest or Not Found
|
||||
version_num = _get_latest_pkg_version(pkginfo)
|
||||
|
||||
if version_num == 'latest' and 'latest' not in pkginfo:
|
||||
version_num = _get_latest_pkg_version(pkginfo)
|
||||
|
||||
# Check if the version is already installed
|
||||
@ -1140,9 +1143,8 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
||||
# Desired version number already installed
|
||||
ret[pkg_name] = {'current': version_num}
|
||||
continue
|
||||
|
||||
# If version number not installed, is the version available?
|
||||
elif version_num not in pkginfo:
|
||||
elif version_num != 'latest' and version_num not in pkginfo:
|
||||
log.error('Version {0} not found for package '
|
||||
'{1}'.format(version_num, pkg_name))
|
||||
ret[pkg_name] = {'not found': version_num}
|
||||
|
Loading…
Reference in New Issue
Block a user