summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package/freebsd
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-10-10 13:31:33 -0700
committerSerdar Sutay <serdar@opscode.com>2014-10-10 13:31:33 -0700
commitec793c6781a3819dd03f989a7027444452d73fa1 (patch)
tree347e8837161ff9589126d45c9bdfdc2431da77bf /lib/chef/provider/package/freebsd
parent69b3c83c3fed6fb18855c44854c2de90eccf2259 (diff)
parent712d4a87678537613413ed730888d63f3b03acd9 (diff)
downloadchef-ec793c6781a3819dd03f989a7027444452d73fa1.tar.gz
Merge pull request #1907 from Aevin1387/freebsd-port-pkgng
Have freebsd port use pkg info if the freebsd version is >= 10000017
Diffstat (limited to 'lib/chef/provider/package/freebsd')
-rw-r--r--lib/chef/provider/package/freebsd/port.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/chef/provider/package/freebsd/port.rb b/lib/chef/provider/package/freebsd/port.rb
index 4b3510f0e9..8b191179f0 100644
--- a/lib/chef/provider/package/freebsd/port.rb
+++ b/lib/chef/provider/package/freebsd/port.rb
@@ -34,7 +34,7 @@ class Chef
end
def current_installed_version
- pkg_info = if supports_pkgng?
+ pkg_info = if @new_resource.supports_pkgng?
shell_out!("pkg info \"#{@new_resource.package_name}\"", :env => nil, :returns => [0,70])
else
shell_out!("pkg_info -E \"#{@new_resource.package_name}*\"", :env => nil, :returns => [0,1])
@@ -53,14 +53,6 @@ class Chef
def port_dir
super(@new_resource.package_name)
end
-
- private
-
- def supports_pkgng?
- with_pkgng = makefile_variable_value('WITH_PKGNG')
- with_pkgng && with_pkgng =~ /yes/i
- end
-
end
end
end