mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #18235 from cho-m/broken_linkage_allowlist
This commit is contained in:
commit
c0f08f82b9
@ -92,6 +92,13 @@ class LinkageChecker
|
|||||||
Regexp.last_match(2)
|
Regexp.last_match(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sig { params(file: String).returns(T::Boolean) }
|
||||||
|
def broken_dylibs_allowed?(file)
|
||||||
|
return false if formula.name != "julia"
|
||||||
|
|
||||||
|
file.start_with?("#{formula.prefix.realpath}/share/julia/compiled/")
|
||||||
|
end
|
||||||
|
|
||||||
def check_dylibs(rebuild_cache:)
|
def check_dylibs(rebuild_cache:)
|
||||||
keg_files_dylibs = nil
|
keg_files_dylibs = nil
|
||||||
|
|
||||||
@ -128,7 +135,7 @@ class LinkageChecker
|
|||||||
if !file_has_any_rpath_dylibs && (dylib.start_with? "@rpath/")
|
if !file_has_any_rpath_dylibs && (dylib.start_with? "@rpath/")
|
||||||
file_has_any_rpath_dylibs = true
|
file_has_any_rpath_dylibs = true
|
||||||
pathname = Pathname(file)
|
pathname = Pathname(file)
|
||||||
@files_missing_rpaths << file if pathname.rpaths.empty?
|
@files_missing_rpaths << file if pathname.rpaths.empty? && !broken_dylibs_allowed?(file.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
next if checked_dylibs.include? dylib
|
next if checked_dylibs.include? dylib
|
||||||
@ -156,7 +163,7 @@ class LinkageChecker
|
|||||||
# If we cannot associate the dylib with a dependency, then it may be a system library.
|
# If we cannot associate the dylib with a dependency, then it may be a system library.
|
||||||
# If dlopen finds the dylib, then the linkage is not broken.
|
# If dlopen finds the dylib, then the linkage is not broken.
|
||||||
@system_dylibs << dylib
|
@system_dylibs << dylib
|
||||||
elsif !system_framework?(dylib)
|
elsif !system_framework?(dylib) && !broken_dylibs_allowed?(file.to_s)
|
||||||
@broken_dylibs << dylib
|
@broken_dylibs << dylib
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user