Module: OS::Mac::DevCmd::Bottle Private
- Included in:
- Homebrew::DevCmd::Bottle
- Defined in:
- extend/os/mac/dev-cmd/bottle.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Instance Method Summary collapse
- #formula_ignores(formula) ⇒ Array<Regexp> private
- #gnu_tar(gnu_tar_formula) ⇒ String private
- #tar_args ⇒ Array<String> private
Instance Method Details
#formula_ignores(formula) ⇒ Array<Regexp>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'extend/os/mac/dev-cmd/bottle.rb', line 23 def formula_ignores(formula) ignores = super cellar_regex = Regexp.escape(HOMEBREW_CELLAR) prefix_regex = Regexp.escape(HOMEBREW_PREFIX) ignores << case formula.name # On Linux, GCC installation can be moved so long as the whole directory tree is moved together: # https://gcc-help.gcc.gnu.narkive.com/GnwuCA7l/moving-gcc-from-the-installation-path-is-it-allowed. when Version.formula_optionally_versioned_regex(:gcc) Regexp.union(%r{#{cellar_regex}/gcc}, %r{#{prefix_regex}/opt/gcc}) if OS.linux? # binutils is relocatable for the same reason: https://github.com/Homebrew/brew/pull/11899#issuecomment-906804451. when Version.formula_optionally_versioned_regex(:binutils) %r{#{cellar_regex}/binutils} if OS.linux? end ignores.compact end |
#gnu_tar(gnu_tar_formula) ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
18 19 20 |
# File 'extend/os/mac/dev-cmd/bottle.rb', line 18 def gnu_tar(gnu_tar_formula) "#{gnu_tar_formula.opt_bin}/gtar" end |
#tar_args ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
9 10 11 12 13 14 15 |
# File 'extend/os/mac/dev-cmd/bottle.rb', line 9 def tar_args if MacOS.version >= :catalina ["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze else [].freeze end end |