From a4c5e64da426a15e673c348e7083b6705f3875e6 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Fri, 8 Sep 2017 12:32:32 -0700 Subject: Revert "mach: Avoid reopening the file for relocation" --- Library/Homebrew/extend/os/mac/keg_relocate.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 7031bea1e..707710be6 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -2,7 +2,7 @@ class Keg def fix_dynamic_linkage mach_o_files.each do |file| file.ensure_writable do - file.change_dylib_id(dylib_id_for(file)) if file.dylib? + change_dylib_id(dylib_id_for(file), file) if file.dylib? each_install_name_for(file) do |bad_name| # Don't fix absolute paths unless they are rooted in the build directory @@ -11,7 +11,7 @@ class Keg !bad_name.start_with?(HOMEBREW_TEMP.realpath.to_s) new_name = fixed_name(file, bad_name) - file.change_install_name(bad_name, new_name, file) + change_install_name(bad_name, new_name, file) unless new_name == bad_name end end end @@ -24,7 +24,7 @@ class Keg file.ensure_writable do if file.dylib? id = dylib_id_for(file).sub(relocation.old_prefix, relocation.new_prefix) - file.change_dylib_id(id) + change_dylib_id(id, file) end each_install_name_for(file) do |old_name| @@ -34,7 +34,7 @@ class Keg new_name = old_name.sub(relocation.old_prefix, relocation.new_prefix) end - file.change_install_name(old_name, new_name) if new_name + change_install_name(old_name, new_name, file) if new_name end end end -- cgit v1.2.3