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>
This allows `brew audit` to inspect the head URLs, for example; until
now, that check was failing silently.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The advertised default is that anything in share/info is removed unless
the user sets HOMEBREW_KEEP_INFO, but we've actually been installing the
files *unless* the variable is set. To illustrate:
$ unset HOMEBREW_KEEP_INFO
$ brew install -v wdiff
[...]
ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
ln /usr/local/share/info/wdiff.info
ln /usr/local/share/info/dir
==> Summary
[...]
$ HOMEBREW_KEEP_INFO=1 brew install -v wdiff
ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
==> Summary
[...]
Obviously not what we wanted.
ClosesHomebrew/homebrew#7989.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
:sha was used to prevent the "--depth" option to git clone, but was
never actually used to checkout the SHA.
ClosesHomebrew/homebrew#7859.
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>
Commit dec4b73aa0 ("Allow `brew update --rebase`") changed the format of
the `git pull` command slightly, introducing an extra space (to allow
for the --rebase option), so let's update the test expectations for this.
We still need to write tests for '--rebase', but in the meantime they
once again pass for the normal case.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.
Fixing this requires only a slight modification to the bottle URL regex;
includes a test.
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>
It was extraneous, and useful only for maintainers and contributors. It
is currently documented on the External Commands page of the wiki.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
In addition to a brief overview of what external commands are, add a
link to the wiki page where the real documentation resides.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Also adjust output text slightly for prettiness.
A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
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.
`DownloadError` is an exception that download stratigies can throw to indicate
that a fetch was incomplete due to a failure in communication.
The `curl` method in `utils.rb` has been upgraded to throw a `DownloadError` if
something bad happens to `curl` execution.
Commit 00cd16f changed oudated_brews to return a list of Formula
objects rather than a list of lists containing formula information.
Now we must access the formula name by using the 'name' accessor rather
than an array index.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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.
When installing with --HEAD, cached repo clones do "git fetch origin"
followed by "git reset --hard". This will only reset the working tree
and index to the state of the local HEAD, but Homebrew will think it's
updated and install anyway. "git reset --hard origin/master" will
achieve the desired result.
Should fixHomebrew/homebrew#7613.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Otherwise, for formula that making the very first install into `sbin`, the
following line will fail with a critical error:
bin = (HOMEBREW_PREFIX/bin.basename).realpath.to_s
Because `sbin` will not exist until after `link` runs.
This isn't very clean as it moves `check_PATH` away from the other checks in
`caveats`, but I couldn't think of a better hotfix that did not require a bit
of code shuffling and re-writing.
`brew-unpack` now runs `Formula.brew` and copies the stage directory to the
unpack location. This provides two improvements:
- Patches may be applied. The `patch` metho of the Formula class is
overloaded such that patches are only applied if the `--patch` option is
passed to `brew unpack`.
- Formula can respond better to flags passed by `ARGV`.
Some trickery is pulled to ensure `DATA` is correctly set for each unpacked
formula.
`brew options --installed` will print options for formulae that are
already installed.
ClosesHomebrew/homebrew#7565.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>