- `brew update` should try to install `curl` before `git` on older
versions of Mac OS X where it is needed for accessing modern SSL
certificates.
- We don't need an HTTP mirror for `git` because `curl` will already be
installed before it is downloaded.
- Don't recommend GCC on Mac OS X versions where it can't be built with
the default system compiler.
- Start using the Homebrew `curl` on Mac OS X versions where it is
needed as soon as it is installed.
Move --prefix, --cellar to the top of brew.sh. Timings on master:
brew --prefix > /dev/null 0.05s user 0.03s system 46% cpu 0.165 total
brew --prefix > /dev/null 0.05s user 0.04s system 63% cpu 0.131 total
brew --prefix > /dev/null 0.04s user 0.03s system 72% cpu 0.104 total
brew --prefix > /dev/null 0.04s user 0.03s system 87% cpu 0.080 total
brew --prefix > /dev/null 0.04s user 0.03s system 81% cpu 0.080 total
brew --prefix > /dev/null 0.04s user 0.03s system 84% cpu 0.075 total
brew --prefix > /dev/null 0.04s user 0.03s system 83% cpu 0.080 total
brew --prefix > /dev/null 0.04s user 0.02s system 84% cpu 0.072 total
brew --prefix > /dev/null 0.04s user 0.03s system 86% cpu 0.072 total
brew --prefix > /dev/null 0.04s user 0.03s system 82% cpu 0.075 total
brew --prefix > /dev/null 0.04s user 0.03s system 85% cpu 0.072 total
brew --prefix > /dev/null 0.04s user 0.03s system 84% cpu 0.076 total
brew --prefix > /dev/null 0.04s user 0.03s system 85% cpu 0.074 total
brew --prefix > /dev/null 0.03s user 0.03s system 83% cpu 0.073 total
brew --prefix > /dev/null 0.04s user 0.02s system 83% cpu 0.072 total
brew --prefix > /dev/null 0.03s user 0.03s system 86% cpu 0.068 total
brew --prefix > /dev/null 0.04s user 0.03s system 82% cpu 0.080 total
brew --prefix > /dev/null 0.04s user 0.03s system 84% cpu 0.079 total
brew --prefix > /dev/null 0.04s user 0.02s system 83% cpu 0.070 total
brew --prefix > /dev/null 0.03s user 0.03s system 84% cpu 0.072 total
With the patch applied:
brew --prefix > /dev/null 0.02s user 0.02s system 24% cpu 0.157 total
brew --prefix > /dev/null 0.02s user 0.03s system 53% cpu 0.078 total
brew --prefix > /dev/null 0.02s user 0.02s system 64% cpu 0.056 total
brew --prefix > /dev/null 0.02s user 0.03s system 74% cpu 0.065 total
brew --prefix > /dev/null 0.01s user 0.02s system 73% cpu 0.049 total
brew --prefix > /dev/null 0.01s user 0.02s system 77% cpu 0.050 total
brew --prefix > /dev/null 0.01s user 0.02s system 64% cpu 0.054 total
brew --prefix > /dev/null 0.01s user 0.02s system 77% cpu 0.049 total
brew --prefix > /dev/null 0.01s user 0.02s system 56% cpu 0.061 total
brew --prefix > /dev/null 0.02s user 0.02s system 66% cpu 0.060 total
brew --prefix > /dev/null 0.01s user 0.02s system 62% cpu 0.057 total
brew --prefix > /dev/null 0.01s user 0.02s system 71% cpu 0.052 total
brew --prefix > /dev/null 0.02s user 0.03s system 67% cpu 0.063 total
brew --prefix > /dev/null 0.01s user 0.02s system 70% cpu 0.042 total
brew --prefix > /dev/null 0.02s user 0.02s system 68% cpu 0.056 total
brew --prefix > /dev/null 0.01s user 0.02s system 73% cpu 0.049 total
brew --prefix > /dev/null 0.01s user 0.02s system 62% cpu 0.058 total
brew --prefix > /dev/null 0.02s user 0.02s system 67% cpu 0.058 total
brew --prefix > /dev/null 0.01s user 0.02s system 73% cpu 0.043 total
brew --prefix > /dev/null 0.01s user 0.02s system 65% cpu 0.055 total
Prefer $XDG_CACHE_HOME if defined, falling back to $HOME/.cache.
The Mac cache location is not affected by this change.
Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
If people have `HOMEBREW_RUBY_PATH` set then things explode in a rather
confusing fashion. Instead, run `bundle` for them with the arguments
that they'd want.
Also, move `macho` requires into the module itself; it's a pain having
to do everything for Bundler before requiring `pathname` which is a core
Ruby class.
November 1st 2016 has come and gone so it's time to disable this.
Also, add comments explaining why the things that have been whitelisted
have been (to avoid more being added without good justification).
If you’re using a /usr/local prefix but e.g. /usr/local/homebrew/Cellar
then you’ll miss out on most binary packages for no good reason so warn
people of that.
`Homebrew/>1.0.0 (no git repository) (Macintosh; Intel macOS 10.7.5)...)
reads pretty weirdly in a user agent and I've had complaints that `>`
may be an invalid character in some cases.
For tagged commits produces the output:
- `1.0.1`
For untagged commits with a dirty tree produces the output:
- `1.0.1-19-g23efbc5-dirty`
Performance:
```
git describe --tags --dirty 2> /dev/null
0.07s user 0.01s system 96% cpu 0.086 total
```
This means we can tag any commit without needing to manually remember
to bump the revision every time.
If we have a `brew.sh` which has set
`HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION` then let's allow an auto-update
migration. That's because it contains the fix below it _before_ the
update happened which means the auto-update won't fail in the same way
as if updating from an old version.
On auto-update `HOMEBREW_LIBRARY` may change location which means that
it won't be found for the actual install command. Look for this having
occurred and then set the new `HOMEBREW_LIBRARY` (and
`HOMEBREW_REPOSITORY`) accordingly.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
This seems generally like a good idea given that we're making syntax changes to
formulae & are going to keep doing so for a little while yet. Taps may have moved
over to that syntax, which then causes tap failures if brew isn't up-to-date.
Should fix situations like https://github.com/Homebrew/homebrew-php/issues/3545.
If you're using e.g. a `/usr/local/homebrew` prefix then don't require
the `/usr/local/Cellar` to be manually created to avoid e.g.
`/usr/local/homebrew/Cellar` being used. Let's do all we can to let
people use this `Cellar` location as it means they can put their
repository wherever they like and still use all our bottles.