summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorEric Saxby <sax@livinginthepast.org>2013-08-29 17:29:36 -0700
committerBryan McLellan <btm@opscode.com>2013-09-25 12:51:34 -0700
commit031bce02c29fd9a2811ad9b63692e1d880e35e84 (patch)
tree4b63a2de9a5deb1d65e3ea513fdeb1bf98b2b609 /lib/chef
parent0a4cb24ef2b17a303c0949b824170c4d8a96857a (diff)
downloadchef-031bce02c29fd9a2811ad9b63692e1d880e35e84.tar.gz
[CHEF-4507] Smartos package provider to match resource package_name
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/provider/package/smartos.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/smartos.rb b/lib/chef/provider/package/smartos.rb
index b17f6f2564..a099337a7b 100644
--- a/lib/chef/provider/package/smartos.rb
+++ b/lib/chef/provider/package/smartos.rb
@@ -64,14 +64,14 @@ class Chef
pkg = shell_out!("/opt/local/bin/pkgin se #{new_resource.package_name}", :env => nil, :returns => [0,1])
pkg.stdout.each_line do |line|
case line
- when /^#{name}/
+ when /^#{new_resource.package_name}/
name, version = line.split[0].split(/-([^-]+)$/)
end
end
@candidate_version = version
version
end
-
+
def install_package(name, version)
Chef::Log.debug("#{@new_resource} installing package #{name} version #{version}")
package = "#{name}-#{version}"