summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-03-15 16:56:45 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-03-15 18:03:30 -0700
commitf6a4bf2fa6b47344acfc65b4f71d7952287a3840 (patch)
treeb0f5db55ce9f306aceb2069060f848da9473e95d
parent5a399a0c5d8367578ad6a57ef3625711dcb2e4dd (diff)
downloadchef-f6a4bf2fa6b47344acfc65b4f71d7952287a3840.tar.gz
mangle array-of-strings here properlyjcowie_yum_refactor
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/provider/package/yum.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index 26368955aa..805a74d013 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -149,7 +149,8 @@ class Chef
# NB: the yum_package provider manages individual single packages, please do not submit issues or PRs to try to add wildcard
# support to lock / unlock. The best solution is to write an execute resource which does a only_if `yum versionlock | grep '^pattern`` kind of approach
def unlock_package(names, versions)
- yum("-d0 -e0 -y", options, "versionlock delete '*:#{resolved_package_lock_names(names)}-*'")
+ # yum versionlock delete on rhel6 needs the glob nonsense in the following command
+ yum("-d0 -e0 -y", options, "versionlock delete", resolved_package_lock_names(names).map { |n| "'*:#{n}-*'" })
end
private