From c7de544fe8b7671a02399b895abfdeb8823f982c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 12 May 2021 21:37:33 +0100 Subject: [PATCH] extend/os/mac/keg_relocate: fix post-bottling dylib ID relocation Running `brew bottle` changes dylib IDs, install names, and rpaths into placeholders for the bottle, creates a bottle tarball, and then changes the placeholders back to their correct values. With my refactoring in #11358, the behaviour of this relocation changed: dylib IDs would no longer be changed back from placeholders into their correct values after the creation of the bottle tarball. --- Library/Homebrew/extend/os/mac/keg_relocate.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 51ac170287..50b3897507 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -22,8 +22,8 @@ class Keg mach_o_files.each do |file| file.ensure_writable do if file.dylib? - id = relocated_name_for(dylib_id_for(file), relocation) - change_dylib_id(id, file) if id + id = relocated_name_for(file.dylib_id, relocation) + change_dylib_id(id, file) end each_install_name_for(file) do |old_name|