From 1c6549517d82fc112088442e2dd75c51ddda3d3b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 13 May 2024 07:49:34 +0100 Subject: [PATCH] linkage_checker: test indirect dependencies. Check for indirect dependencies with linkage with linkage in strict test mode. This should be done to ensure we accurately declare dependencies in homebrew/core. --- Library/Homebrew/linkage_checker.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/linkage_checker.rb b/Library/Homebrew/linkage_checker.rb index 16975e7581447..6abbde82dd994 100644 --- a/Library/Homebrew/linkage_checker.rb +++ b/Library/Homebrew/linkage_checker.rb @@ -67,6 +67,7 @@ def display_test_output(puts_output: true, strict: false) display_items("Conflicting libraries", @version_conflict_deps, puts_output:) return unless strict + display_items("Indirect dependencies with linkage", @indirect_deps, puts_output:) display_items("Undeclared dependencies with linkage", @undeclared_deps, puts_output:) display_items("Files with missing rpath", @files_missing_rpaths, puts_output:) display_items "@executable_path references in libraries", @executable_path_dylibs, puts_output: @@ -79,7 +80,7 @@ def broken_library_linkage?(test: false, strict: false) issues = [@broken_deps, @broken_dylibs] if test issues += [@unwanted_system_dylibs, @version_conflict_deps] - issues += [@undeclared_deps, @files_missing_rpaths, @executable_path_dylibs] if strict + issues += [@indirect_deps, @undeclared_deps, @files_missing_rpaths, @executable_path_dylibs] if strict end issues.any?(&:present?) end