diff options
| author | Mike McQuaid | 2017-03-21 14:49:22 +0100 |
|---|---|---|
| committer | GitHub | 2017-03-21 14:49:22 +0100 |
| commit | 7d068d468d7d6773f0f8d22dbb98c5766e3c19fe (patch) | |
| tree | 8bbb240824388cde822fb94b2637b869f15f6316 /Library/Homebrew/dev-cmd/audit.rb | |
| parent | b3a32070fe708047c8feee604797e94dbec74f9d (diff) | |
| parent | eadbd95d2c785c78ac4d6deee37e0841fc155d6b (diff) | |
| download | brew-7d068d468d7d6773f0f8d22dbb98c5766e3c19fe.tar.bz2 | |
Merge pull request #2365 from MikeMcQuaid/audit-provided-by-macos
audit: check system dupe deps on new formulae.
Diffstat (limited to 'Library/Homebrew/dev-cmd/audit.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 7cad2f0d3..9c85539cd 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -472,6 +472,12 @@ class FormulaAuditor problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'." end + if @new_formula && dep_f.keg_only_reason && + !["openssl", "apr", "apr-util"].include?(dep.name) && + [:provided_by_macos, :provided_by_osx].include?(dep_f.keg_only_reason.reason) + problem "Dependency '#{dep.name}' may be unnecessary as it is provided by macOS; try to build this formula without it." + end + dep.options.reject do |opt| next true if dep_f.option_defined?(opt) dep_f.requirements.detect do |r| |
