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.
Now that the default from the installer, our CI and soon all users
is `/usr/local/Homebrew` it's a lot easier to check if there's
references to it (as we cannot look for `/usr/local` as it's a too
commonly hardcoded path).
Dependencies/requirements of a dependency need to be installed/satisfied
before the dependency. The fact that @pour_failed may be false is
irrelevant to that imperative if we weren't pouring to begin with, so
this commit now checks for that case as well.
If a requirement is for a dependent that's already installed and that
dependency is not using a `default_formula` (which would have already
been converted from a `Requirement` to `Dependency` at this stage) then
we want to stop it killing the build.
Read the discussion in https://github.com/Homebrew/homebrew-core/pull/3703. If you
have a better idea, please file a competing PR. I'm sick to death of discussion.
Closes#662.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Doesn't feel like a good reason to abort installation for users if the
formula author has specified a conflict that doesn't exist. Instead,
behave more like the `TapFormulaUnavailableError` but print a message
telling people to report to the formula authors.
Closes https://github.com/Homebrew/homebrew-versions/issues/1327
When a given dependency appears multiple times in a formula's dependency
tree, the inherited options for that dependency should accumulate rather
than being overwritten each time that dependency is considered by
expand_dependencies. In particular, this impacts "universal" since the
dependency should be built with universal unless all of its instances in
the dependency tree don't have "universal" as opposed to only if the last
instance considered has "universal."
Closes Homebrew/homebrew-core#1604.
Closes#308.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
When passing formula options with value, e.g. `--with-qt=5`, to the
child process responsible for building a formula, `ARGV.value` would be
invoked with `nil`. Handle this more elegantly (no change in behavior).
For consistency, use a regular expression adapted from `Options.create`
instead of the somewhat bogus one used before.
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
- add `HOMEBREW_PRODUCT` global variable
- only differentiate between `/usr/local` and `non-/usr/local` Homebrew
prefixes to avoid sharing sensitive user information
- note if e.g. build errors are occurring under CI
- Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out
when this is enabled for everyone)
- Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics
that are sent
- Move Bash analytics code to `Library/Homebrew/utils/analytics.sh`
- Add documentation for our analytics and why/what/when/how and opt-out
- Only official Homebrew commands are reported
- Ruby analytics are now reported in a forked, background process
Calling `compute_dependencies` will make sure both requirements and
dependencies are expanded, so that any referenced taps can be
auto-tapped. Prior to this commit only dependencies were expanded for
the sake of auto-tapping, so dependencies of requirements would cause
installation to fail whenever a tap unavailable exception was
encountered.
ClosesHomebrew/homebrew#50271ClosesHomebrew/homebrew#50281.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>