From fde7ca31b826a01621edd8eb98d91e053ed24e55 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Fri, 3 Feb 2023 21:53:22 +0900 Subject: [PATCH] add alias generic_formula_ignores formula_ignores --- Library/Homebrew/dev-cmd/bottle.rb | 2 ++ Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb | 10 +--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index c052d07e6b..a4aed67ad6 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -275,6 +275,8 @@ module Homebrew ignores.compact end + alias generic_formula_ignores formula_ignores + def bottle_formula(f, args:) local_bottle_json = args.json? && f.local_bottle_path.present? diff --git a/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb b/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb index b4084354f6..2187c0d751 100644 --- a/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb +++ b/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb @@ -23,18 +23,10 @@ module Homebrew end def formula_ignores(f) - ignores = [] cellar_regex = Regexp.escape(HOMEBREW_CELLAR) prefix_regex = Regexp.escape(HOMEBREW_PREFIX) - # Ignore matches to go keg, because all go binaries are statically linked. - any_go_deps = f.deps.any? do |dep| - dep.name =~ Version.formula_optionally_versioned_regex(:go) - end - if any_go_deps - go_regex = Version.formula_optionally_versioned_regex(:go, full: false) - ignores << %r{#{cellar_regex}/#{go_regex}/[\d.]+/libexec} - end + ignores = generic_formula_ignores(f) ignores << case f.name # On Linux, GCC installation can be moved so long as the whole directory tree is moved together: