Skip to content
Snippets Groups Projects
Unverified Commit e8b5eb7e authored by Carlo Cabrera's avatar Carlo Cabrera
Browse files

extend/os/mac/keg_relocate: fix relocation of duplicate `RPATH`s

Homebrew/homebrew-core#77623 revealed two bugs. One in `ruby-macho`,
which turns out to be unable to delete duplicated `RPATH`s. This was
fixed with `ruby-macho` 2.5.1.

The second, which this commit fixes, is in our handling of duplicate
`RPATH`s. Since we iterate over each `RPATH`, attempting to relocate the
first duplicate fails since it will no longer exist after having
relocated the original.
parent 7ff63124
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,7 @@ class Keg
def each_linkage_for(file, linkage_type, &block)
links = file.method(linkage_type)
.call
.uniq
.reject { |fn| fn =~ /^@(loader_|executable_|r)path/ }
links.each(&block)
end
......
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