aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorJack Nagel2013-12-04 22:37:57 -0600
committerJack Nagel2013-12-04 22:37:57 -0600
commitf2aaa5f0ac615dbf3560085652baf4c8af202bac (patch)
treea94562ef939bf1c898673eba50f3933ac1fd7def /Library/Homebrew/formula_installer.rb
parent2b5e57a4bdcad38d1c93e2cf04d34c782bf6fc5d (diff)
downloadbrew-f2aaa5f0ac615dbf3560085652baf4c8af202bac.tar.bz2
Teach installer about prefix and cellar placeholders
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 4aa66f407..f69e1f3a1 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -435,17 +435,12 @@ class FormulaInstaller
end
def fix_install_names
- Keg.new(f.prefix).fix_install_names(:keg_only => f.keg_only?)
+ keg = Keg.new(f.prefix)
+ keg.fix_install_names(:keg_only => f.keg_only?)
+
if @poured_bottle and f.bottle
- old_prefix = f.bottle.prefix
- new_prefix = HOMEBREW_PREFIX.to_s
- old_cellar = f.bottle.cellar
- new_cellar = HOMEBREW_CELLAR.to_s
-
- if old_prefix != new_prefix or old_cellar != new_cellar
- Keg.new(f.prefix).relocate_install_names \
- old_prefix, new_prefix, old_cellar, new_cellar, :keg_only => f.keg_only?
- end
+ keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s,
+ Keg::CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s, :keg_only => f.keg_only?
end
rescue Exception => e
onoe "Failed to fix install names"