diff options
Diffstat (limited to 'lib/chef/provider/package/openbsd.rb')
-rw-r--r-- | lib/chef/provider/package/openbsd.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/chef/provider/package/openbsd.rb b/lib/chef/provider/package/openbsd.rb index 82048c3bd4..f231101390 100644 --- a/lib/chef/provider/package/openbsd.rb +++ b/lib/chef/provider/package/openbsd.rb @@ -22,7 +22,6 @@ require 'chef/resource/package' require 'chef/provider/package' -require 'chef/mixin/shell_out' require 'chef/mixin/get_source_from_package' require 'chef/exceptions' @@ -72,7 +71,7 @@ class Chef if parts = name.match(/^(.+?)--(.+)/) # use double-dash for stems with flavors, see man page for pkg_add name = parts[1] end - shell_out!("pkg_add -r #{name}#{version_string}", :env => {"PKG_PATH" => pkg_path}).status + shell_out_with_timeout!("pkg_add -r #{name}#{version_string}", :env => {"PKG_PATH" => pkg_path}).status Chef::Log.debug("#{new_resource.package_name} installed") end end @@ -83,7 +82,7 @@ class Chef if parts = name.match(/^(.+?)--(.+)/) name = parts[1] end - shell_out!("pkg_delete #{name}#{version_string}", :env => nil).status + shell_out_with_timeout!("pkg_delete #{name}#{version_string}", :env => nil).status end private @@ -94,7 +93,7 @@ class Chef else name = new_resource.package_name end - pkg_info = shell_out!("pkg_info -e \"#{name}->0\"", :env => nil, :returns => [0,1]) + pkg_info = shell_out_with_timeout!("pkg_info -e \"#{name}->0\"", :env => nil, :returns => [0,1]) result = pkg_info.stdout[/^inst:#{Regexp.escape(name)}-(.+?)\s/, 1] Chef::Log.debug("installed_version of '#{new_resource.package_name}' is '#{result}'") result @@ -103,7 +102,7 @@ class Chef def candidate_version @candidate_version ||= begin results = [] - shell_out!("pkg_info -I \"#{new_resource.package_name}#{version_string}\"", :env => nil, :returns => [0,1]).stdout.each_line do |line| + shell_out_with_timeout!("pkg_info -I \"#{new_resource.package_name}#{version_string}\"", :env => nil, :returns => [0,1]).stdout.each_line do |line| if parts = new_resource.package_name.match(/^(.+?)--(.+)/) results << line[/^#{Regexp.escape(parts[1])}-(.+?)\s/, 1] else |