diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-12-15 14:34:24 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2021-12-15 14:34:24 -0800 |
commit | 398d42dd9fc8319c9a5d6f8c4b67e308c38330db (patch) | |
tree | b2e4533e6cecf91399541f41afd0a77a2fbd4b7c | |
parent | e7c01b838980ceb14a555550169fa0a90363cb08 (diff) | |
download | chef-398d42dd9fc8319c9a5d6f8c4b67e308c38330db.tar.gz |
remove vestigial add_version hack
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/provider/package/yum/python_helper.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/chef/provider/package/yum/python_helper.rb b/lib/chef/provider/package/yum/python_helper.rb index df46c77c03..6ca5cf5183 100644 --- a/lib/chef/provider/package/yum/python_helper.rb +++ b/lib/chef/provider/package/yum/python_helper.rb @@ -217,25 +217,6 @@ class Chef private - # i couldn't figure out how to decompose an evr on the python side, it seems reasonably - # painless to do it in ruby (generally massaging nevras in the ruby side is HIGHLY - # discouraged -- this is an "every rule has an exception" exception -- any additional - # functionality should probably trigger moving this regexp logic into python) - def add_version(hash, version) - epoch = nil - if version =~ /(\S+):(\S+)/ - epoch = $1 - version = $2 - end - if version =~ /(\S+)-(\S+)/ - version = $1 - release = $2 - end - hash["epoch"] = epoch unless epoch.nil? - hash["release"] = release unless release.nil? - hash["version"] = version - end - def query(action, parameters) with_helper do json = build_query(action, parameters) @@ -254,11 +235,6 @@ class Chef hash[param_name] = param_value unless param_value.nil? end - # Special handling for certain action / param combos - # if %i{whatinstalled whatavailable}.include?(action) - # add_version(hash, parameters["version"]) unless parameters["version"].nil? - # end - FFI_Yajl::Encoder.encode(hash) end |