Skip to content
Snippets Groups Projects
Unverified Commit 6b63abb8 authored by William Woodruff's avatar William Woodruff
Browse files

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.
parent 87121393
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment