summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package
diff options
context:
space:
mode:
authorLiam Wilson <cosinusoidally@gmail.com>2018-08-17 14:31:22 +0100
committerLiam Wilson <cosinusoidally@gmail.com>2018-08-17 14:31:22 +0100
commit5884ae1cc5419e9b15d0e0f963a8c45229be2f76 (patch)
tree2d8cc9a0b6dd6c40eb738cf84aeda3c7b745954f /lib/chef/provider/package
parent7395e450b0c15fa9f462039bc5a864f699960716 (diff)
downloadchef-5884ae1cc5419e9b15d0e0f963a8c45229be2f76.tar.gz
Restart Python yum helper before each repo enable/disable
Diffstat (limited to 'lib/chef/provider/package')
-rw-r--r--lib/chef/provider/package/yum/python_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/package/yum/python_helper.rb b/lib/chef/provider/package/yum/python_helper.rb
index 47caf46f57..3da4bb92e8 100644
--- a/lib/chef/provider/package/yum/python_helper.rb
+++ b/lib/chef/provider/package/yum/python_helper.rb
@@ -112,10 +112,11 @@ class Chef
parameters = { "provides" => provides, "version" => version, "arch" => arch }
repo_opts = options_params(options || {})
parameters.merge!(repo_opts)
+ # XXX: for now we restart before and after every query with an enablerepo/disablerepo to clean the helpers internal state
+ restart unless repo_opts.empty?
query_output = query(action, parameters)
version = parse_response(query_output.lines.last)
Chef::Log.trace "parsed #{version} from python helper"
- # XXX: for now we restart after every query with an enablerepo/disablerepo to clean the helpers internal state
restart unless repo_opts.empty?
version
end