diff --git a/Library/Homebrew/linkage_checker.rb b/Library/Homebrew/linkage_checker.rb index c0d154b232..db753fc9b0 100644 --- a/Library/Homebrew/linkage_checker.rb +++ b/Library/Homebrew/linkage_checker.rb @@ -32,7 +32,7 @@ class LinkageChecker @unnecessary_deps = [] @unwanted_system_dylibs = [] @version_conflict_deps = [] - @executables_missing_rpaths = [] + @files_missing_rpaths = [] check_dylibs(rebuild_cache: rebuild_cache) end @@ -47,7 +47,7 @@ class LinkageChecker display_items "Undeclared dependencies with linkage", @undeclared_deps display_items "Dependencies with no linkage", @unnecessary_deps display_items "Unwanted system libraries", @unwanted_system_dylibs - display_items "Executables with missing rpath", @executables_missing_rpaths + display_items "Files with missing rpath", @files_missing_rpaths end def display_reverse_output @@ -71,12 +71,12 @@ class LinkageChecker display_items "Unwanted system libraries", @unwanted_system_dylibs, puts_output: puts_output display_items "Conflicting libraries", @version_conflict_deps, puts_output: puts_output display_items "Undeclared dependencies with linkage", @undeclared_deps, puts_output: puts_output if strict - display_items "Executables with missing rpath", @executables_missing_rpaths, puts_output: puts_output + display_items "Files with missing rpath", @files_missing_rpaths, puts_output: puts_output end sig { params(strict: T::Boolean).returns(T::Boolean) } def broken_library_linkage?(strict: false) - issues = [@broken_deps, @unwanted_system_dylibs, @version_conflict_deps, @executables_missing_rpaths] + issues = [@broken_deps, @unwanted_system_dylibs, @version_conflict_deps, @files_missing_rpaths] issues << @undeclared_deps if strict [issues, unexpected_broken_dylibs, unexpected_present_dylibs].flatten.any?(&:present?) end @@ -159,12 +159,12 @@ class LinkageChecker dylibs.each do |dylib| @reverse_links[dylib] << file - # Binary executables that link @rpath-prefixed dylibs must include at + # Files that link @rpath-prefixed dylibs must include at # least one rpath in order to resolve it. if !file_has_any_rpath_dylibs && (dylib.start_with? "@rpath/") file_has_any_rpath_dylibs = true pathname = Pathname(file) - @executables_missing_rpaths << file if pathname.binary_executable? && pathname.rpaths.empty? + @files_missing_rpaths << file if pathname.rpaths.empty? end next if checked_dylibs.include? dylib