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.
This was really confusing to me, and I had to go looking through the Tab
history, where I found a comment explaining it that has since been
deleted. This wasn't a great experience.
This commit basically adds that explanation back in.
The `build` and `source_modified_time` arguments are always coming from
the matching attributes of the `Formula` instance. Thus query `formula`
for them instead of passing them individually.