Use apt_pkg.version_compare if available

This refs #24397

Signed-off-by: Mathieu Le Marec - Pasquet <kiorky@cryptelium.net>
This commit is contained in:
Mathieu Le Marec - Pasquet 2015-06-04 14:00:05 +02:00
parent 1c0cd459f8
commit 235c78ddfe

View File

@ -1262,7 +1262,7 @@ def latest(
targets = {}
problems = []
cmp_func = __salt__.get('version_cmp')
cmp_func = __salt__.get('pkg.version_cmp', __salt__.get('version_cmp'))
for pkg in desired_pkgs:
if not avail[pkg]:
if not cur[pkg]: