Merge pull request #667 from aluuu/master

Fix __package_yum explorer
remotes/origin/4.9
Darko Poljak 7 years ago committed by GitHub
commit 98ceebe386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cdist/conf/type/__package_yum/explorer/pkg_version
  2. 11
      cdist/conf/type/__package_yum/gencode-remote

@ -27,4 +27,4 @@ else
name="$__object_id"
fi
rpm -q --whatprovides "$name" 2>/dev/null || true
rpm -q "$name" 2>/dev/null || rpm -q --whatprovides "$name" 2>/dev/null || true

@ -43,10 +43,15 @@ else
opts="--assumeyes --quiet"
fi
not_installed="^no package provides"
not_provided="^no package provides"
not_installed='is not installed$'
if grep -q "$not_installed" "$__object/explorer/pkg_version"; then
state_is="absent"
if grep -q "$not_provided" "$__object/explorer/pkg_version"; then
if grep -q "$not_installed" "$__object/explorer/pkg_version"; then
state_is="absent"
else
state_is="present"
fi
else
state_is="present"
fi

Loading…
Cancel
Save