aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb15
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb3
2 files changed, 8 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"
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 9271cc26b..716fcf874 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -110,6 +110,9 @@ class Keg
"#{lib}/#{bad_name}"
elsif (abs_name = find_dylib(Pathname.new(bad_name).basename)) && abs_name.exist?
abs_name.to_s
+ elsif bad_name.start_with? PREFIX_PLACEHOLDER, CELLAR_PLACEHOLDER
+ # Skip these, relocate_install_names will fix them
+ bad_name
else
opoo "Could not fix #{bad_name} in #{file}"
bad_name