formula_installer: fix regression in #1253
Apparently `cellar :any_skip_relocation` doesn't actually mean we can skip relocation, at least for text files.
This commit is contained in:
parent
79e8cdd3ed
commit
652c5bc865
@ -762,12 +762,11 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
keg = Keg.new(formula.prefix)
|
keg = Keg.new(formula.prefix)
|
||||||
|
tab = Tab.for_keg(keg)
|
||||||
|
Tab.clear_cache
|
||||||
|
|
||||||
unless formula.bottle_specification.skip_relocation?
|
skip_linkage = formula.bottle_specification.skip_relocation?
|
||||||
tab = Tab.for_keg(keg)
|
keg.replace_placeholders_with_locations tab.changed_files, skip_linkage: skip_linkage
|
||||||
Tab.clear_cache
|
|
||||||
keg.replace_placeholders_with_locations tab.changed_files
|
|
||||||
end
|
|
||||||
|
|
||||||
Pathname.glob("#{formula.bottle_prefix}/{etc,var}/**/*") do |path|
|
Pathname.glob("#{formula.bottle_prefix}/{etc,var}/**/*") do |path|
|
||||||
path.extend(InstallRenamed)
|
path.extend(InstallRenamed)
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class Keg
|
|||||||
replace_text_in_files(relocation)
|
replace_text_in_files(relocation)
|
||||||
end
|
end
|
||||||
|
|
||||||
def replace_placeholders_with_locations(files)
|
def replace_placeholders_with_locations(files, skip_linkage: false)
|
||||||
relocation = Relocation.new(
|
relocation = Relocation.new(
|
||||||
old_prefix: PREFIX_PLACEHOLDER,
|
old_prefix: PREFIX_PLACEHOLDER,
|
||||||
old_cellar: CELLAR_PLACEHOLDER,
|
old_cellar: CELLAR_PLACEHOLDER,
|
||||||
@ -49,7 +49,7 @@ class Keg
|
|||||||
new_cellar: HOMEBREW_CELLAR.to_s,
|
new_cellar: HOMEBREW_CELLAR.to_s,
|
||||||
new_repository: HOMEBREW_REPOSITORY.to_s
|
new_repository: HOMEBREW_REPOSITORY.to_s
|
||||||
)
|
)
|
||||||
relocate_dynamic_linkage(relocation)
|
relocate_dynamic_linkage(relocation) unless skip_linkage
|
||||||
replace_text_in_files(relocation, files: files)
|
replace_text_in_files(relocation, files: files)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user