bottle: add --skip-relocation flag to skip keg relocate
This flag is indented to be used in `homebrew/portable` to build vendor ruby/git/curl.
This commit is contained in:
parent
a2681d196f
commit
d4e8d3df0a
@ -194,10 +194,12 @@ module Homebrew
|
|||||||
original_tab = nil
|
original_tab = nil
|
||||||
|
|
||||||
begin
|
begin
|
||||||
keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER,
|
unless ARGV.include? "--skip-relocation"
|
||||||
cellar, Keg::CELLAR_PLACEHOLDER
|
keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER,
|
||||||
keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER,
|
cellar, Keg::CELLAR_PLACEHOLDER
|
||||||
cellar, Keg::CELLAR_PLACEHOLDER
|
keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER,
|
||||||
|
cellar, Keg::CELLAR_PLACEHOLDER
|
||||||
|
end
|
||||||
|
|
||||||
keg.delete_pyc_files!
|
keg.delete_pyc_files!
|
||||||
|
|
||||||
@ -246,9 +248,14 @@ module Homebrew
|
|||||||
ignores << %r{#{HOMEBREW_CELLAR}/go/[\d\.]+/libexec}
|
ignores << %r{#{HOMEBREW_CELLAR}/go/[\d\.]+/libexec}
|
||||||
end
|
end
|
||||||
|
|
||||||
relocatable = !keg_contains(prefix_check, keg, ignores)
|
if ARGV.include? "--skip-relocation"
|
||||||
relocatable = !keg_contains(cellar, keg, ignores) && relocatable
|
relocatable = true
|
||||||
skip_relocation = relocatable && !keg.require_install_name_tool?
|
skip_relocation = true
|
||||||
|
else
|
||||||
|
relocatable = !keg_contains(prefix_check, keg, ignores)
|
||||||
|
relocatable = !keg_contains(cellar, keg, ignores) && relocatable
|
||||||
|
skip_relocation = relocatable && !keg.require_install_name_tool?
|
||||||
|
end
|
||||||
puts if !relocatable && ARGV.verbose?
|
puts if !relocatable && ARGV.verbose?
|
||||||
rescue Interrupt
|
rescue Interrupt
|
||||||
ignore_interrupts { bottle_path.unlink if bottle_path.exist? }
|
ignore_interrupts { bottle_path.unlink if bottle_path.exist? }
|
||||||
@ -256,10 +263,12 @@ module Homebrew
|
|||||||
ensure
|
ensure
|
||||||
ignore_interrupts do
|
ignore_interrupts do
|
||||||
original_tab.write if original_tab
|
original_tab.write if original_tab
|
||||||
keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, prefix,
|
unless ARGV.include? "--skip-relocation"
|
||||||
Keg::CELLAR_PLACEHOLDER, cellar
|
keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, prefix,
|
||||||
keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, prefix,
|
Keg::CELLAR_PLACEHOLDER, cellar
|
||||||
Keg::CELLAR_PLACEHOLDER, cellar
|
keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, prefix,
|
||||||
|
Keg::CELLAR_PLACEHOLDER, cellar
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user