diff options
author | Thomas Berger <th.berger@it.piratenpartei.de> | 2014-07-25 19:12:09 +0200 |
---|---|---|
committer | Thomas Berger <th.berger@it.piratenpartei.de> | 2014-07-25 19:12:09 +0200 |
commit | 0e4a46c5f8cbcf8be6cc2b26301cb1563ca03058 (patch) | |
tree | 88778f83fedbd160db2df2264c040b8d339d8cf2 /lib | |
parent | 53473e271fa8796e76aefb9776aa3ee0ebc1a424 (diff) | |
download | chef-0e4a46c5f8cbcf8be6cc2b26301cb1563ca03058.tar.gz |
use package.timeout for the cave timeout value
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/package/paludis.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/provider/package/paludis.rb b/lib/chef/provider/package/paludis.rb index 7d40fdff03..feb3c9ada6 100644 --- a/lib/chef/provider/package/paludis.rb +++ b/lib/chef/provider/package/paludis.rb @@ -27,6 +27,11 @@ class Chef include Chef::Mixin::ShellOut + def initialize(name, run_context=nil) + super + @new_resource.timeout ||= 3600 + end + def load_current_resource @current_resource = Chef::Resource::Package.new(@new_resource.package_name) @current_resource.package_name(@new_resource.package_name) @@ -62,7 +67,7 @@ class Chef else pkg = "#{@new_resource.package_name}" end - shell_out!("cave -L warning resolve -x#{expand_options(@new_resource.options)} \"#{pkg}\"",:timeout => 86400) + shell_out!("cave -L warning resolve -x#{expand_options(@new_resource.options)} \"#{pkg}\"",:timeout => @new_resource.timeout) end def upgrade_package(name, version) |