This will actually throw some possibly unwanted warnings, e.g. whining
about using mirrors.kernel.org for Debian software; we might only want
that warning for the default URL.
Perhaps mirrors deserve their own audit_formula_mirrors, but rather than
duplicate code, let's just check them against the standard criteria for
now.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Checking out over HTTP/HTTPS from GitHub requires git 1.6.6, as GitHub
only allows Smart HTTP transport.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
These were being picked up as just "#{prefix}/lib" and prefix+'lib' due
to the eagerness of the regex. Reordering "lib" and "libexec" will take
care of it; I couldn't think of a more clever solution.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
A few formula use ARGV.flag? instead of ARGV.include?. This made `audit`
recognize a few undocumented instances of a '--devel' option, but we can
just ignore that like '--HEAD' for now, and change the behavior if we
decide they need to be documented explicitly in each formula.
cf. Homebrew/homebrew#7456.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.
The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `DownloadError`.
Other brew commands, like brew-fetch, also benefit from mirror support by using
this method.
ClosesHomebrew/homebrew#7574.
Previously, `outdated_brews` returned a list of lists---each containing three
components of a Formula object:
- f.rack
- f.name
- f.version
Frequently more information is required which necessitates back-casting from
`name` to a Formula object---simpy returning formula objects removes this step.
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class.
`brew options --installed` will print options for formulae that are
already installed.
ClosesHomebrew/homebrew#7565.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
`git status -s` would spit out "fatal: not a git repository" when not in
HOMEBREW_PREFIX or a child directory of HOMEBREW_PREFIX. Specify a
git-dir and work-tree to fix this.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
`brew fetch --force` was a no-op for formula pathnames when that formula
did not exist in Library/Formula, because `brew --cache #{f.name}`
results in an error for that case.
Fix it by always using f.cached_download.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
`brew update` was treating all changes to internal commands as
deletions due to a typo, resulting in spurious notifications of removed
commands.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Specify the refspec 'refs/heads/master:refs/remotes/origin/master' so
that the remote-tracking branch origin/master gets update during `brew
update` (git-pull updates remote-tracking branches when invoked
like `git pull` or `git pull origin`, but not `git pull origin master`).
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Rationale: brew doctor shouldn't give warnings for a default install. And this particular warning only applies for a small subset of formula: the ones that are "dupes".
If we get reported issues that prove this was a mistake we will revert it.
Removed updated external commands, like seriously, who cares? We could add it back as if --verbose is set I guess but in all honesty, if nobody complains then nobody cared.
# We removed many redundant comments
Removed many redundant comments.
FixesHomebrew/homebrew#7191; though it could be fixed better.
Will be useful for a variety of reasons, but for now, I'm just using it to ensure install won't install again if something is already installed (use brew upgrade instead).
But means that brew switch and that can work properly etc.