Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew-audit is inconsistent regarding depends_on "git" #37696

Closed
bfontaine opened this issue Mar 13, 2015 · 4 comments
Closed

brew-audit is inconsistent regarding depends_on "git" #37696

bfontaine opened this issue Mar 13, 2015 · 4 comments

Comments

@bfontaine
Copy link
Contributor

To reproduce this issue, create a Library/Formula/test.rb file:

class Test < Formula
  homepage "http://www.example.com"
  url "http://www.example.com/foo"
  version "0.1.0"
  sha256 "9b25a4c8e12d6703627ba24f4547a7d4350ca1ef9fa44415512b1bcc57b06506"

  depends_on "git"

  def install
  end

  test do
    system "true"
  end
end

Then run brew audit --strict test:

1 file inspected, no offenses detected

==> audit problems
test:
 * Use `depends_on :git` instead of `depends_on 'git'`

Error: 1 problems in 1 formulae

Now fix the audit problem:

depends_on :git

And re-audit:

Error: Unsupported special dependency :git
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/dependency_collector.rb:136:in `parse_symbol_spec'
/usr/local/Library/Homebrew/dependency_collector.rb:81:in `parse_spec'
/usr/local/Library/Homebrew/dependency_collector.rb:65:in `build'
/usr/local/Library/Homebrew/dependency_collector.rb:48:in `block in fetch'
/usr/local/Library/Homebrew/dependency_collector.rb:48:in `fetch'
/usr/local/Library/Homebrew/dependency_collector.rb:48:in `fetch'
/usr/local/Library/Homebrew/dependency_collector.rb:38:in `add'
/usr/local/Library/Homebrew/software_spec.rb:128:in `depends_on'
/usr/local/Library/Homebrew/formula.rb:923:in `block in depends_on'
/usr/local/Library/Homebrew/formula.rb:923:in `each'
/usr/local/Library/Homebrew/formula.rb:923:in `depends_on'
/usr/local/Library/Formula/test.rb:7:in `<class:Test>'
/usr/local/Library/Formula/test.rb:1:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:92:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:71:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:200:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/audit.rb:12:in `audit'
/usr/local/Library/brew.rb:135:in `<main>'

$ brew doctor
Your system is ready to brew.
$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 01dd3e19f8e600c3f44a3b140103f330aa32447c
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
OS X: 10.10.2-x86_64
Xcode: 6.2
CLT: 6.2.0.0.1.1424975374
Clang: 6.0 build 600
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/baptiste/.rvm/rubies/ruby-2.1.0/bin/ruby
Java: 1.7.0_40
@jacknagel
Copy link
Contributor

Yeah, the advice is wrong, we never list git as a dependency and there is no :git dependency.

@xu-cheng
Copy link
Member

There is a GitDependency. But we fail to associate it with :git.

@MikeMcQuaid
Copy link
Member

We should instead tell people to just not depend on git.

@MikeMcQuaid
Copy link
Member

(as it is always installed)

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants