diff options
author | Tim Smith <tsmith@chef.io> | 2018-08-20 10:26:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 10:26:52 -0700 |
commit | bc7f22585712fc9f32f0ac774eea13479c8339ed (patch) | |
tree | 22451b1cf7648272acd5fc57e190bd53464dcf71 | |
parent | 9c14c5838c02c4ff889d2f48b1b191ad2cac0b51 (diff) | |
parent | 5884ae1cc5419e9b15d0e0f963a8c45229be2f76 (diff) | |
download | chef-bc7f22585712fc9f32f0ac774eea13479c8339ed.tar.gz |
Merge pull request #7558 from cosinusoidally/issue-7540
Restart Python yum helper before each repo enable/disable
-rw-r--r-- | lib/chef/provider/package/yum/python_helper.rb | 3 |
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 |