Merge pull request #5830 from sjackman/audit-provided-by-macos-on-linux

audit: Keg-only :provided_by_macos dep okay on Linux
This commit is contained in:
Shaun Jackman 2019-03-02 14:03:49 -08:00 committed by GitHub
commit 6c78b267ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -386,10 +386,10 @@ module Homebrew
problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'." problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."
end end
if @new_formula && dep_f.keg_only_reason && if @new_formula &&
!["openssl", "apr", "apr-util"].include?(dep.name) && dep_f.keg_only_reason&.reason == :provided_by_macos &&
!["openblas"].include?(dep.name) && dep_f.keg_only_reason.valid? &&
dep_f.keg_only_reason.reason == :provided_by_macos !["apr", "apr-util", "openblas", "openssl"].include?(dep.name)
new_formula_problem( new_formula_problem(
"Dependency '#{dep.name}' may be unnecessary as it is provided " \ "Dependency '#{dep.name}' may be unnecessary as it is provided " \
"by macOS; try to build this formula without it.", "by macOS; try to build this formula without it.",

View File

@ -252,7 +252,7 @@ module Homebrew
its(:problems) { are_expected.to be_empty } its(:problems) { are_expected.to be_empty }
end end
describe "which is not whitelisted" do describe "which is not whitelisted", :needs_macos do
subject { fa } subject { fa }
let(:fa) do let(:fa) do