Merge pull request #15941 from MikeMcQuaid/audit_gcc_dependency_not_strict

formula_auditor: make Linux-only GCC dep audit non-strict.
This commit is contained in:
Mike McQuaid 2023-09-03 09:13:58 -04:00 committed by GitHub
commit a1269fcbfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -445,16 +445,9 @@ module Homebrew
def audit_gcc_dependency
return unless @core_tap
return if !@strict && !(@git && formula.tap.git?) # git log is required for non-strict audit
return unless Homebrew::SimulateSystem.simulating_or_running_on_linux?
return unless linux_only_gcc_dep?(formula)
bad_gcc_dep = @strict || begin
fv = FormulaVersions.new(formula)
fv.formula_at_revision("origin/HEAD") { |prev_f| !linux_only_gcc_dep?(prev_f) }
end
return unless bad_gcc_dep
problem "Formulae in homebrew/core should not have a Linux-only dependency on GCC."
end