aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorWilliam Woodruff2017-01-07 15:06:46 -0500
committerWilliam Woodruff2017-01-07 15:06:46 -0500
commit6b63abb850a4478199e39327464dc014b632a9f1 (patch)
treec2147e764f9360109f7fbd4dd1cac034f6036cc0 /Library
parent871213932763eac4f62ec3a9d2dcbaffdc2042fa (diff)
downloadbrew-6b63abb850a4478199e39327464dc014b632a9f1.tar.bz2
keg_relocate: Check HOMEBREW_TEMP's realpath when excluding name changes.
Since /tmp (the default HOMEBREW_TEMP) is a symlink to /private/tmp, some build systems (like Parrot's) will attempt to use the realpath instead of the literal /tmp we supply it with. This breaks the relocation code, which only tested the literal HOMEBREW_TEMP and not its realpath.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/os/mac/keg_relocate.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb
index 8f73daba5..f44a97b31 100644
--- a/Library/Homebrew/extend/os/mac/keg_relocate.rb
+++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -6,7 +6,9 @@ class Keg
each_install_name_for(file) do |bad_name|
# Don't fix absolute paths unless they are rooted in the build directory
- next if bad_name.start_with?("/") && !bad_name.start_with?(HOMEBREW_TEMP.to_s)
+ next if bad_name.start_with?("/") &&
+ !bad_name.start_with?(HOMEBREW_TEMP.to_s) &&
+ !bad_name.start_with?(HOMEBREW_TEMP.realpath.to_s)
new_name = fixed_name(file, bad_name)
change_install_name(bad_name, new_name, file) unless new_name == bad_name