Update the build-essential cookbook

This removes deprecation warnings on Chef 14, which ships with the
build_essential resource
This commit is contained in:
Greg Karékinian
2019-04-03 15:29:22 +02:00
parent 374d6bc975
commit adc417282d
7 changed files with 22 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
# Cookbook:: build-essential
# resource:: build_essential
#
# Copyright:: 2008-2018, Chef Software, Inc.
# Copyright:: 2008-2018, Chef Software Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
# limitations under the License.
#
chef_version_for_provides '< 14.0' if respond_to?(:chef_version_for_provides)
provides :build_essential
resource_name :build_essential
@@ -36,8 +37,6 @@ action :install do
package 'devel/autoconf'
package 'devel/m4'
package 'devel/gettext'
# Only install gcc on freebsd 9.x - 10 uses clang
package 'lang/gcc49' if node['platform_version'].to_i <= 9
when 'mac_os_x'
xcode_command_line_tools 'install'
when 'omnios'

View File

@@ -38,7 +38,6 @@ action :install do
# Remove the placeholder to prevent perpetual appearance in the update utility
rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
EOH
# rubocop:enable Metrics/LineLength
end
end
end
@@ -53,9 +52,6 @@ action_class do
def installed?
cmd = Mixlib::ShellOut.new('pkgutil --pkgs=com.apple.pkg.CLTools_Executables')
cmd.run_command
cmd.error!
true
rescue Mixlib::ShellOut::ShellCommandFailed
false
cmd.error? ? false : true
end
end