Postinstall should be executed with the spec of the target formula not
the spec argument from ARGV, otherwise the prefix can be incorrect. In
other words, if the stable version of a dependency gets installed,
postinstall for the dependency should use the prefix of the dependency's
stable version, not the prefix of its devel or head version.
Fixes#2941.
Rather than using the name of the keg for the key use the full path.
This provides several advantages:
- there's no need to invalidate the cache on a `brew upgrade` or
`brew switch`
- it's easier to figure out what cache entries can be removed and this
can be done whenever a keg is removed by `brew uninstall` or
`brew cleanup`.
Also, ensure that an `install` (or `reinstall`, `upgrade`) always
results in the cache being rebuilt for that keg (in case different
options were used).
Instead of adding a custom method to `Tab` use `Tab.runtime_deps_hash`
within `FormulaInstaller` to ensure the `runtime_dependencies` are in
the right format.
This ensures the we’re calculating we’ve run `fix_dynamic_linkage` so
that their results are consistent with what we’re actually pouring.
Combined with the linkage cache (which will be enabled by default in
future) this has very little performance overhead for consistently
Correct tab results.
As a result, don’t bother looking at opportunistically linked
dependencies when creating a tab by default but only do so after
installation has completed.
Finally, only output the caveats and summary after all these
operations have completed.
1. Running `brew linkage some_package` does not set the cache.
2. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `true` should build the cache.
3. Running `brew linkage --cached some_package` when `DatabaseCache.empty?` returns `false` should use the cache.
Allow at `install` (or `install --only-dependencies`) time to specify
that test dependencies should be installed. This will allow simplifying
code in `brew test-bot`.
This could also be made an environment variable if desired by
maintainers.
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.