From 6b63abb850a4478199e39327464dc014b632a9f1 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sat, 7 Jan 2017 15:06:46 -0500 Subject: [PATCH] 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. --- Library/Homebrew/extend/os/mac/keg_relocate.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 8f73daba59..f44a97b31d 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