From 36ce3c58d7deb3467858ff7aefb05c819be9c416 Mon Sep 17 00:00:00 2001 From: Phil Dibowitz Date: Fri, 19 Dec 2014 19:03:44 -0800 Subject: Multipackge support Allow the `package` provider to take an array of packages to handle in one transaction. This solves two large problems: * There are times when you cannot install two packages in sequence, like when a binary is moving between two packages - they *must* be done in the same transaction. * When using Chef to install the vast majority of your base system, it can make imaging take a very, very long time because executing yum or apt once for every single package is painfully slow. This solves both. The scaffolding is all there in the Package HWRP, plus the underlying implementation for both apt and yum, the two I have access to test. --- lib/chef/resource/package.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/chef/resource') diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb index 772439b06c..f4f49b543b 100644 --- a/lib/chef/resource/package.rb +++ b/lib/chef/resource/package.rb @@ -46,7 +46,7 @@ class Chef set_or_return( :package_name, arg, - :kind_of => [ String ] + :kind_of => [ String, Array ] ) end @@ -54,7 +54,7 @@ class Chef set_or_return( :version, arg, - :kind_of => [ String ] + :kind_of => [ String, Array ] ) end -- cgit v1.2.1