linkage_checker: Add harmless dylibs check.
While the linkage checker should normally report all broken links, there are a few cases where broken links are harmless. One case is when a the PPC slice of a program links to a PPC-only library that no longer exists on x86_64 OS X. Since the PPC slice is never loaded on modern OS X, inconsistencies within it do not need to be reported.
This commit is contained in:
parent
cd7e3cd39d
commit
47fe214963
@ -36,6 +36,7 @@ class LinkageChecker
|
|||||||
rescue NotAKegError
|
rescue NotAKegError
|
||||||
@system_dylibs << dylib
|
@system_dylibs << dylib
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
|
next if harmless_broken_link?(dylib)
|
||||||
@broken_dylibs << dylib
|
@broken_dylibs << dylib
|
||||||
else
|
else
|
||||||
tap = Tab.for_keg(owner).tap
|
tap = Tab.for_keg(owner).tap
|
||||||
@ -114,6 +115,14 @@ class LinkageChecker
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
# Whether or not dylib is a harmless broken link, meaning that it's
|
||||||
|
# okay to skip (and not report) as broken.
|
||||||
|
def harmless_broken_link?(dylib)
|
||||||
|
# libgcc_s_ppc64 is referenced by programs that use the Java Service Wrapper,
|
||||||
|
# and is harmless on x86(_64) machines
|
||||||
|
["/usr/lib/libgcc_s_ppc64.1.dylib"].include?(dylib)
|
||||||
|
end
|
||||||
|
|
||||||
# Display a list of things.
|
# Display a list of things.
|
||||||
# Things may either be an array, or a hash of (label -> array)
|
# Things may either be an array, or a hash of (label -> array)
|
||||||
def display_items(label, things)
|
def display_items(label, things)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user