summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-08-16 16:43:40 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-08-16 16:43:40 -0700
commitced6032716aa80fb76fafd2e49f5225ae55bfc70 (patch)
tree3cfe27cb250063886ced56f7aa5035c731bfeb0e
parent49fd808d7e290a72de1d45c258fde78acf8782d8 (diff)
downloadchef-ced6032716aa80fb76fafd2e49f5225ae55bfc70.tar.gz
fix el6 32-bit testslcg/fix-yum
We've been relying on the yum libraries to throw away the version information that we supply here and return the version that is installed that matches the name + arch. On el6 32-bit we've hit a bug in the yum libraries where it appears to not do this. The simple solution here is to just throw away the version information ourselves. I think at one point early in the development of the new yum provider that there was more of a point to supplying the version here, but as it evolved that went away, but this argument was still kept around vestigially. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/provider/package/yum.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index 029d9dc2e0..e991e4541e 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -237,9 +237,9 @@ class Chef
def installed_version(index)
@installed_version ||= []
@installed_version[index] ||= if new_resource.source
- python_helper.package_query(:whatinstalled, available_version(index).name, version: safe_version_array[index], arch: safe_arch_array[index])
+ python_helper.package_query(:whatinstalled, available_version(index).name, arch: safe_arch_array[index])
else
- python_helper.package_query(:whatinstalled, package_name_array[index], version: safe_version_array[index], arch: safe_arch_array[index])
+ python_helper.package_query(:whatinstalled, package_name_array[index], arch: safe_arch_array[index])
end
@installed_version[index]
end