extend/os/mac/keg_relocate: fix relocation of duplicate RPATHs
				
					
				
			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.
This commit is contained in:
		
							parent
							
								
									7ff63124e8
								
							
						
					
					
						commit
						e8b5eb7e42
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user