Merge pull request #18675 from Homebrew/formula_auditor-pkgconf

This commit is contained in:
Patrick Linnane 2024-11-03 00:34:04 -07:00 committed by GitHub
commit 4d0deeb68e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -361,8 +361,10 @@ module Homebrew
EOS
end
# we want to allow uses_from_macos for aliases but not bare dependencies
if self.class.aliases.include?(dep.name) && !dep.uses_from_macos?
# we want to allow uses_from_macos for aliases but not bare dependencies.
# we also allow `pkg-config` for backwards compatibility in external taps.
# TODO: after migrating all `pkg-config` usage to `pkgconf`, do not allow `pkg-config` in core tap
if self.class.aliases.include?(dep.name) && !dep.uses_from_macos? && dep.name != "pkg-config"
problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."
end