diff options
author | Tim Smith <tsmith@chef.io> | 2020-08-05 12:42:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-05 12:42:45 -0700 |
commit | 401f2f3eb579fe22938458ee234f08a1944179aa (patch) | |
tree | c804e6bf727efca4b5165e88afad3f4335dd9c49 /omnibus | |
parent | fc2fba329a45ed33a8434b5f40e4b3ebc6c6613d (diff) | |
parent | 1b83dfafe5cf4a48ce19009f8d05b628cf037a76 (diff) | |
download | chef-401f2f3eb579fe22938458ee234f08a1944179aa.tar.gz |
Merge pull request #10265 from chef/skip_bins
Cleanup extra binaries from libxml2 and libxslt
Diffstat (limited to 'omnibus')
-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..2f1db9caea 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_f(file_path) + else + puts "Binary #{file_path} not found. Skipping." + end end end end |