- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.
While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.
Fixes#8997
Because a `Tab` is an `OpenStruct` the existing calls to
`any_args_or_options?` would always return `false`. This means that
`Formula#declared_runtime_dependencies` would never call
`Tab#without?` to check whether a dependency has been brought in by an
option.
Fixes#4407
Hopefully put this to bed for once and for all. Add a new method
`runtime_formulae_dependencies` which returns the `runtime_dependencies`
which have only the `Formula` objects that exist. I've checked all the
`runtime_dependencies` callers and updated them accordingly.
Also, fix a few cases where runtime dependencies were being read from
the tab when this wasn't desirable.
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.
See https://github.com/Homebrew/brew/pull/1750#discussion_r94243825 for
discussion.
Removes Tab#reliable_runtime_dependencies? in favour of returning nil
from Tab#runtime_dependencies if the list is unreliable.
Because Homebrew 1.1.6 hasn't been tagged yet, tabs created in tests
aren't created with a homebrew_version that marks the
runtime_dependencies in the Tab as reliable, so there are some tests
that fail. To work around this, I've had to add a line to some tests
that explicitly overrides the homebrew_version in the Tab. This is
really ugly though, so they should be removed as soon as possible after
1.1.6 is released.
These were formerly supported but as it has been a very long time since
32-bit software was necessary on macOS these have been deprecated with
a `brew audit` warning and a future `odeprecated`.
This was causing the flaky tests that #1508 started skipping.
This is the second time that `Formula.installed`'s cache has bitten
me with intermittent test failures, and I'd like it to be the last,
so I've made it so the cache is cleared automatically when a tab is
created. This _should_ mean that the cache is cleared any time it
needs to be, with the exception of when a Keg is created artificially
with no tab. I don't think there's anything I can do to automatically
handle that use-case, though.
Replace relocate_text_files with three methods that clarify intent:
replace_locations_with_placeholders, replace_placeholders_with_locations
and replace_text_in_files, the first two calling the third.
`brew bottle` replaces instances of the Homebrew prefix, cellar, and
repository with placeholders in all text files. Cache these files in
INSTALL_RECEIPT.json so that we don't have to check every single text
file for placeholders on install.