summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglasschef <glass@getchef.com>2014-05-09 17:35:59 -0500
committerglasschef <glass@getchef.com>2014-05-09 17:35:59 -0500
commit590fb1e3f921eba552f85af516bac2684d2a9a74 (patch)
treeda618acf954cca75d0570059ce49f1eae204f581
parent30b279a0532f843155a58763660514e2dc005dbd (diff)
downloadchef-590fb1e3f921eba552f85af516bac2684d2a9a74.tar.gz
Allow for multiple package files to be passed to yum
-rw-r--r--lib/chef/provider/package/yum.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb
index f56d3140b6..fe936e8dcb 100644
--- a/lib/chef/provider/package/yum.rb
+++ b/lib/chef/provider/package/yum.rb
@@ -1066,9 +1066,11 @@ class Chef
@current_resource.package_name(@new_resource.package_name)
if @new_resource.source
- unless ::File.exists?(@new_resource.source)
- raise Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
- end
+ @new_resource.source.split(' ').each do |sourcefile|
+ unless ::File.exists?(@new_resource.source)
+ raise Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
+ end
+ end
Chef::Log.debug("#{@new_resource} checking rpm status")
shell_out!("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}", :timeout => Chef::Config[:yum_timeout]).stdout.each_line do |line|