aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2016-10-25 01:30:01 -0700
committerGitHub2016-10-25 01:30:01 -0700
commita4f654fd3fdc37bcab8cce1288e60153cb1a7073 (patch)
treeb60696861f59ba5e174edab68230f038981cfd51 /Library
parentca540d881100055e95e0db1439e81b02c88bea40 (diff)
parent652c5bc865ebda25ead84c5cab04a4688b4e2b9a (diff)
downloadbrew-a4f654fd3fdc37bcab8cce1288e60153cb1a7073.tar.bz2
Merge pull request #1376 from jawshooah/fix-relocate-regression
formula_installer: fix regression in #1253
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb9
-rw-r--r--Library/Homebrew/keg_relocate.rb4
2 files changed, 6 insertions, 7 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 006db8f8a..c25702059 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -762,12 +762,11 @@ class FormulaInstaller
end
keg = Keg.new(formula.prefix)
+ tab = Tab.for_keg(keg)
+ Tab.clear_cache
- unless formula.bottle_specification.skip_relocation?
- tab = Tab.for_keg(keg)
- Tab.clear_cache
- keg.replace_placeholders_with_locations tab.changed_files
- end
+ skip_linkage = formula.bottle_specification.skip_relocation?
+ keg.replace_placeholders_with_locations tab.changed_files, skip_linkage: skip_linkage
Pathname.glob("#{formula.bottle_prefix}/{etc,var}/**/*") do |path|
path.extend(InstallRenamed)
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index 712408b8b..41686b1bb 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -40,7 +40,7 @@ class Keg
replace_text_in_files(relocation)
end
- def replace_placeholders_with_locations(files)
+ def replace_placeholders_with_locations(files, skip_linkage: false)
relocation = Relocation.new(
old_prefix: PREFIX_PLACEHOLDER,
old_cellar: CELLAR_PLACEHOLDER,
@@ -49,7 +49,7 @@ class Keg
new_cellar: HOMEBREW_CELLAR.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)
end