summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-03-15 16:23:25 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-03-15 18:03:30 -0700
commit5a399a0c5d8367578ad6a57ef3625711dcb2e4dd (patch)
tree57a6ba7be7747fb88fd95c626c3bddf2ab455e88
parent7cd48994f877a8b90c435b705bd5faec394919c3 (diff)
downloadchef-5a399a0c5d8367578ad6a57ef3625711dcb2e4dd.tar.gz
el6 fixes
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/provider/package/yum.rb2
-rw-r--r--spec/functional/resource/yum_package_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index 0130c149a9..26368955aa 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -149,7 +149,7 @@ 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("-d0 -e0 -y", options, "versionlock delete '*:#{resolved_package_lock_names(names)}-*'")
end
private
diff --git a/spec/functional/resource/yum_package_spec.rb b/spec/functional/resource/yum_package_spec.rb
index bb2685c725..b06bbe686a 100644
--- a/spec/functional/resource/yum_package_spec.rb
+++ b/spec/functional/resource/yum_package_spec.rb
@@ -1,5 +1,5 @@
#
-# Copyright:: Copyright 2016-2017, Chef Software Inc.
+# Copyright:: Copyright 2016-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -892,7 +892,7 @@ gpgcheck=0
end
before(:each) do
- shell_out("yum versionlock delete '*'") # will exit with error when nothing is locked, we don't care
+ shell_out("yum versionlock delete '*:chef_rpm-*'") # will exit with error when nothing is locked, we don't care
end
it "locks an rpm" do