It only makes sense to tell a user to try installing from a bottle if
there are bottles available for them to install for all the formulae
they specified.
This has been a nightmare in terms of the complexity to our dependency
system and the whack-a-mole required on bugs. If a Requirement resolves
to a Formula it should just use `depends_on "formula"` instead. This
matches the effective behaviour all users of bottles (the vast majority
of users and installs) and what we're doing in Homebrew/homebrew-core.
It's not possible to determine the difference between a non-keg-only
keg that failed to link and one that wasn't linked by us intentionally.
To avoid additional complexity of storing this logic in another place
let's back out this relatively new functionality; sticky keg-only links
is a better and more desirable behaviour anyway.
This reverts commit cc752e97f6dcfb3e58c9e753262926672edeb571.
Fixes#1585.
I will open a new issue for the actual underlying bug here (that
requirements aren't being handled correctly based on the stable/devel
spec used at installation time).
formula.bottle is nil when bottle.compatible_cellar? is false.
Use formula.bottle_specification.compatible_cellar? rather
than formula.bottle.compatible_cellar?.
- `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.
Don't ignore f.pour_bottle? and compatible_cellar? when pouring
a local bottle. --force-bottle may be used to pour a local
bottle that is incompatible, as it is for remote bottles.
This also helpfully avoids always building all dependencies from source
when passing `--build-bottle` or forcing all bottles when passing
`--force-bottle`.
Treat a `brew install` command as normal i.e. link by default unless
keg-only and only specify whether a keg should be linked when upgrading
or reinstalling. Also, adjust the naming accordingly so it's more
obvious that this is the case.
This means if a user has manually `brew unlink` or `brew link --force`d
something then that status will be preserved after they `brew upgrade`
or `brew reinstall` that formula.
This generally should make things that are keg-only by default easier
to swallow.
Only check runtime dependencies for version conflicts to avoid
having to create unnecessary duplicate formulae.
For example, a formula that needs to be built with ghc@8.0 should still
be allowed to have a build-time dependency on a cabal-install that was
itself built with ghc@8.2.