aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
AgeCommit message (Collapse)Author
2016-10-25formula_installer: fix regression in #1253Josh Hagins
Apparently `cellar :any_skip_relocation` doesn't actually mean we can skip relocation, at least for text files.
2016-10-24keg_relocate: refactor relocate_text_filesJosh Hagins
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.
2016-10-24keg_relocate: cache files rewritten during brew bottleJosh Hagins
`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.
2016-10-17install: prune build-only deps of depsAndrew Janke
This avoids needlessly installing build-time dependencies of dependencies which are not themselves being built from source.
2016-10-12formula_installer: Remove obsolete hard dependency on cctools.William Woodruff
ruby-macho now performs all relocations in Homebrew. Additionally, delete the defunct CctoolsRequirement.
2016-10-01Add `Formatter` module.Markus Reiter
2016-10-01Merge pull request #1052 from sjackman/store-formulaMike McQuaid
Store the formula used to build the keg in the keg
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-23Store the formula used to build the keg in the kegShaun Jackman
Store the formula used to build the keg inside the keg in a file named NAME/VERSION/.brew/NAME.rb after removing the bottle do ... end block. See https://github.com/Homebrew/brew-evolution/pull/6. Closes https://github.com/Homebrew/brew/issues/931.
2016-09-23Fix Style/IfUnlessModifier.Markus Reiter
2016-09-23Fix Style/MethodName.Markus Reiter
2016-09-23Fix DoubleNegation.Markus Reiter
2016-09-18Relocate HOMEBREW_REPOSITORY when necessary.Mike McQuaid
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).
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-09-13Make scons use stdenv only if immediate build depAlex Wang
formula_installer will use stdenv if scons is anywhere in the formula's recursive dependency list: https://github.com/Homebrew/legacy-homebrew/issues/40401#issuecomment-110066355 Having scons as a dependency should only require stdenv if it is an immediate build dependency, as otherwise scons shouldn't be invoked.
2016-09-09Merge pull request #863 from penman/preserve_aliasMike McQuaid
Save aliases in INSTALL_RECEIPT
2016-09-07formula_installer: don't allow pinned dependenciesVlad Shablinsky
Prompt user to unpin pinned dependencies of the formula
2016-09-05Formula#specified_pathAlyssa Ross
2016-09-05Replace install_name/install_ref with alias_pathAlyssa Ross
2016-09-03Preserve alias when installing formulaeAlyssa Ross
Part of #567
2016-09-01formula_installer: install deps of dep before depilovezfs
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.
2016-08-19separate build and test logsAndrew Janke
2016-08-15formula_installer: use Sandbox.formula? method.Mike McQuaid
2016-08-12install_dependencies: Do not truncate dependenciesShaun Jackman
See Homebrew/legacy-homebrew#48449
2016-08-09formula_installer: report --HEAD/--devel usage.Mike McQuaid
2016-08-09formula_installer: tweak dependent requirements.Mike McQuaid
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.
2016-08-09formula_installer: prevent MaximumMacOSRequirement leakageDominyk Tiller
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>
2016-08-08formula_installer: better handle missing conflict.Mike McQuaid
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
2016-07-29Add missing development_tools requires.Mike McQuaid
2016-07-21FormulaInstaller#sanitized_ARGV_options: fix regexXu Cheng
This fixes a regression caused by 2e961dc9dee63f641f7f162fd7a2845c5fd092fe, where a misplaced `+` cause the regex only catch one character. Fixes https://github.com/Homebrew/homebrew-science/issues/3847.
2016-07-16Use HeadVersion for install/reinstallVlad Shablinsky
2016-07-09keg_relocate: port to generic OS. (#453)Mike McQuaid
2016-07-09emoji: extract logic into generic OS classes. (#450)Mike McQuaid
2016-07-07Use GitRepositoryExtension for HOMEBREW_REPOSITORYMartin Afanasjew
2016-07-06development_tools: add installed? method. (#455)Mike McQuaid
2016-06-02formula_installer: accumulate inherited optionsilovezfs
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>
2016-05-12formula_installer: fix option-with-value handlingMartin Afanasjew
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.
2016-05-08Make bottle code cross-platform.Mike McQuaid
2016-05-06brew install: make -s apply only to given formula, not deps (#205)Andrew Janke
2016-05-03analytics: move to a class. Mike McQuaid
Global namespaces are good to avoid when possible.
2016-04-18brew test, install, update-test: add --keep-tmp optionAndrew Janke
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>
2016-04-12Homebrew (opt-in) Analytics tweaks. (#57)Mike McQuaid
- 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
2016-04-04formula_installer: report install attempts.Mike McQuaid
Closes https://github.com/Homebrew/legacy-homebrew/pull/50462.
2016-03-29FormulaInstaller: rescue tap unavail for reqs tooilovezfs
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. Closes Homebrew/homebrew#50271 Closes Homebrew/homebrew#50281. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-02-18formula_installer: use new pour_bottle DSL.Mike McQuaid
2016-02-18formula_installer: improve bottle cellar message.Mike McQuaid
2016-02-18formula_installer: cleanup existing pour_bottle logic.Mike McQuaid
2016-02-10FormulaInstaller: uncache Tab to keep it freshXu Cheng
Fixes Homebrew/homebrew#48612. Fixes Homebrew/homebrew#48657. Closes Homebrew/homebrew#48886. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-19Revert "formula_installed: tweak source build behaviour."Mike McQuaid
This reverts commit 5dd200c6b40f4fa9cc3a70cbc9ca2885e4626943. Closes Homebrew/homebrew#47889.