From 347e9460f4411e207431cebabfad959dde0769d4 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 30 Oct 2024 15:52:09 -0400 Subject: [PATCH] formula_auditor: allow `pkg-config` alias for `pkgconf` migration --- Library/Homebrew/formula_auditor.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index ff23f1f9dd..306103a022 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -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