Use pkg.list_pkgs function to determine package state
PROD-32474
Change-Id: I831f00304bc827ad8e84f907304fd25909c98d28
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index d972252..fa6dd60 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -1351,11 +1351,11 @@
def isPackageInstalled(Map params) {
def output = params.get('output', true)
- def res = runSaltProcessStep(params.saltId, params.target, "pkg.info_installed", params.packageName, null, output)['return'][0]
+ def res = runSaltProcessStep(params.saltId, params.target, "pkg.list_pkgs", [], null, output)['return'][0]
if (res) {
for (int i = 0; i < res.size(); i++) {
def key = res.keySet()[i]
- if (!(res[key] instanceof Map && res[key].containsKey(params.packageName))) {
+ if (!(res[key] instanceof Map && res[key].get(params.packageName, false))) {
return false
}
}