diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-04 19:29:38 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-04 19:30:17 -0700 |
commit | c30538a04c7c3731bc294f17129fea2c58eba4ba (patch) | |
tree | e6e752edb029cb90b4ef0df2eab7234baf939a16 /omnibus/config | |
parent | 760e8b596f2be5b4e77bd076d9fece38dba1b723 (diff) | |
download | chef-c30538a04c7c3731bc294f17129fea2c58eba4ba.tar.gz |
Cleanup extra binaries from libxml2 and libxsltskip_bins
Neither of these libraries let you skip building these.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'omnibus/config')
-rw-r--r-- | omnibus/config/software/more-ruby-cleanup.rb | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/omnibus/config/software/more-ruby-cleanup.rb b/omnibus/config/software/more-ruby-cleanup.rb index 95412abd5a..17e2f104fd 100644 --- a/omnibus/config/software/more-ruby-cleanup.rb +++ b/omnibus/config/software/more-ruby-cleanup.rb @@ -106,13 +106,22 @@ build do end end - block "Remove empty gem dirs from Ruby's built-in gems" do - Dir.glob("#{install_dir}/embedded/lib/ruby/gems/*/gems/*".tr('\\', "/")).each do |d| - # skip unless the dir is empty - next unless Dir.children(d).empty? - - puts "Deleting empty gem dir: #{d}" - FileUtils.rm_rf(d) + block "Remove extra unused binaries that are built with libraries we ship" do + %w{ + xml2-config + xmlcatalog + xmllint + xslt-config + xsltproc + }.each do |f| + file_path = "#{install_dir}/embedded/bin/#{f}" + + if ::File.exist?(file_path) + puts "Deleting binary at #{file_path}" + FileUtils.rm_rf(file_path) + else + puts "Binary #{file_path} not found. Skipping." + end end end end |