aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-07-30 19:58:25 +0800
committerXu Cheng2015-07-30 20:11:19 +0800
commit8c7b6291491ec0a6d50c7b0dfcc4912d12253418 (patch)
tree2ad429f3d2cc59bf34dfa2080cbcc620d61b56f5 /Library
parent68b865fcb1dfe47feba7c51537fead0d0b9fcb32 (diff)
downloadbrew-8c7b6291491ec0a6d50c7b0dfcc4912d12253418.tar.bz2
formula_installer: relocate bottle immediately after it's poured
Closes Homebrew/homebrew#42268. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 2b66f8e10..355517e49 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -398,7 +398,7 @@ class FormulaInstaller
keg = Keg.new(formula.prefix)
link(keg)
- fix_install_names(keg) if OS.mac?
+ fix_install_names(keg)
if build_bottle? && formula.post_install_defined?
ohai "Not running post_install as we're building a bottle"
@@ -580,11 +580,6 @@ class FormulaInstaller
def fix_install_names(keg)
keg.fix_install_names(:keg_only => formula.keg_only?)
-
- if @poured_bottle
- keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
- Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s, :keg_only => formula.keg_only?
- end
rescue Exception => e
onoe "Failed to fix install names"
puts "The formula built, but you may encounter issues using it or linking other"
@@ -630,6 +625,10 @@ class FormulaInstaller
downloader.stage
end
+ keg = Keg.new(formula.prefix)
+ keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
+ Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s, :keg_only => formula.keg_only?
+
Pathname.glob("#{formula.bottle_prefix}/{etc,var}/**/*") do |path|
path.extend(InstallRenamed)
path.cp_path_sub(formula.bottle_prefix, HOMEBREW_PREFIX)