mac/keg_relocate: Remove short-circuit, cleanup

This commit is contained in:
William Woodruff 2018-12-19 20:12:28 -05:00
parent a6bcbdb20d
commit c4363e8c58
No known key found for this signature in database
GPG Key ID: 600D68320BE45ACC

View File

@ -78,14 +78,11 @@ class Keg
def expand_rpath(file, bad_name)
suffix = bad_name.sub(/^@rpath/, "")
# short circuit: we expect lib to be usually correct, so we try it first
return (lib / suffix) if (lib / suffix).exist?
file.rpaths.each do |rpath|
return (rpath / suffix) if (rpath / suffix).exist?
return (rpath/suffix) if (rpath/suffix).exist?
end
opoo "Could not expand an RPATH in #{file}"
opoo "Could not find library #{bad_name} for #{file}"
bad_name
end