mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix refernces to __salt__['version_cmp']
This will never exist, this should have been __salt__['pkg.version_cmp'] from the beginning.
This commit is contained in:
parent
a19fa2296a
commit
457e72e273
1 changed files with 3 additions and 2 deletions
|
@ -98,11 +98,12 @@ def _fulfills_version_spec(versions, oper, desired_version):
|
|||
Returns True if any of the installed versions match the specified version,
|
||||
otherwise returns False
|
||||
'''
|
||||
cmp_func = __salt__.get('pkg.version_cmp')
|
||||
for ver in versions:
|
||||
if salt.utils.compare_versions(ver1=ver,
|
||||
oper=oper,
|
||||
ver2=desired_version,
|
||||
cmp_func=__salt__.get('version_cmp')):
|
||||
cmp_func=cmp_func):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
@ -1263,7 +1264,7 @@ def latest(
|
|||
|
||||
targets = {}
|
||||
problems = []
|
||||
cmp_func = __salt__.get('pkg.version_cmp', __salt__.get('version_cmp'))
|
||||
cmp_func = __salt__.get('pkg.version_cmp')
|
||||
for pkg in desired_pkgs:
|
||||
if not avail[pkg]:
|
||||
if not cur[pkg]:
|
||||
|
|
Loading…
Add table
Reference in a new issue