aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
AgeCommit message (Collapse)Author
2017-06-03Merge pull request #2722 from ↵Mike McQuaid
MikeMcQuaid/formula-installer-show-upgrade-revision formula_installer: display full upgrade version.
2017-06-02formula_installer: display full upgrade version.Mike McQuaid
Previously this omitted the revision which meant the currently installed and upgrade version showed as the same.
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2017-06-01Revert "Fix operator spacing."ilovezfs
2017-05-31Fix operator spacing.Markus Reiter
2017-05-29Fixup all RuboCop warnings.Mike McQuaid
2017-05-27Improve some `brew install` messaging.Mike McQuaid
Improve the messaging around `brew install` when there's a possible user action such as an `upgrade` or `link` and don't tell people to `install --force` when it's unnecessary. While I did this, tweak the output and function usage in a couple of related places. Some example output before this change: ``` Warning: openssl is a keg-only and another version is linked to opt. Use `brew install --force` if you want to install this version Warning: mysql@5.6 is a keg-only and another version is linked to opt. Use `brew install --force` if you want to install this version Warning: analog-6.0_1 already installed Warning: bash-completion@2-2.5 already installed, it's just not linked. ``` Some example output after this change: ``` Error: openssl 1.0.2k is already installed To upgrade to 1.0.2l, run `brew upgrade openssl` Warning: mysql@5.6 5.6.36_1 is already installed Warning: analog 6.0_1 is already installed Warning: bash-completion@2 2.5 is already installed, it's just not linked. You can use `brew link bash-completion@2` to link this version. ```
2017-05-09Allow --interactive to access HOMEMike McQuaid
This may result in a slightly varied build but it’s generally just far less annoying to be able to access all your e.g. shell configuration.
2017-05-08Travis CI tweaks.Mike McQuaid
Attempt to improve Travis CI. This time without any vendoring gems nonsense.
2017-05-03Install etc/var files on postinstall.Mike McQuaid
Also, don't delete them after that. This means that `brew postinstall` becomes a way to easily reinstall configuration files for any formula without needing any changes to any bottles or requiring a reinstall.
2017-04-25formula_installer: improve install/upgrade messageMike McQuaid
If you `brew install` a formula that's already installed you get: Warning: ripgrep-0.5.1 already installed If you `brew install` an outdated formula that's installed you get: Error: ripgrep-0.5.1 already installed. To install this version, first `brew unlink ripgrep` Instead, suggest that the user should `brew upgrade` in this case. If the formula isn't outdated use the previous message.
2017-04-23Fix and remove various TODOs.Mike McQuaid
Fix those that can be done so without tearing Homebrew to pieces and remove the comments for those that can never be done.
2017-04-21formula_installer: remove feature flags.Mike McQuaid
We've been testing the recursive dependency check and allowing unlinked dependencies in CI for a while with no adverse consequences so enable them globally now for all users.
2017-04-18audit: allow skipping audit methods.Mike McQuaid
Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
2017-03-25formula_installer: tweak req formula additions.Mike McQuaid
Rather than just checking if a requirement's dependency is installed or not check if the requirement was actually satisfied by a particular formula rather than e.g. just having a `default_formula` defined.
2017-03-15formula_installer: need up to date req formulae.Mike McQuaid
This makes them behave consistently to other dependencies. Otherwise other checks for them being `installed?` will fail. Fixes #2333 Closes #2302 Fixes https://github.com/Homebrew/homebrew-science/issues/5247
2017-02-21formula_installer: detect recursive dependencies.Mike McQuaid
Detect recursive dependencies and refuse to install them providing instruction on exactly what is depending on what. Fixes #1933.
2017-02-12Merge pull request #1992 from MikeMcQuaid/no-check-unlinked-dependenciesMike McQuaid
formula_installer: add env to allow unlinked deps.
2017-02-12rubocop: trailing comma in multiline method callsAlyssa Ross
Discussed in https://github.com/Homebrew/brew/pull/1987/files#r100693581. This was originally ommitted because it wasn't compatible with Ruby 1.8. (See https://github.com/Homebrew/legacy-homebrew/pull/48144#r49928971).
2017-02-12formula_installer: add env to allow unlinked deps.Mike McQuaid
We can enable this locally and/or in `brew test-bot` to see if this code is needed any more. If we can remove it we can start doing much more interesting things with linking keg-only, versioned formulae and system dupe formulae.
2017-01-18formula_installer: use attr_accessor for installed_*Mike McQuaid
2017-01-18formula_installer: use installed_* variables.Mike McQuaid
Also, report formulae installed on request. This is useful in differentiating between those formulae that are popular because they are widely requested and those that are popular because they are widely depended on.
2017-01-17Merge pull request #1815 from MikeMcQuaid/dependency_to_formulaMike McQuaid
requirement: get formula from satisfy.
2017-01-15formula_installer: set specified_path on pour.Mike McQuaid
This means that a `brew install $ALIAS` records the path accordingly so e.g. `Formula#full_installed_specified_name` returns the correct path.
2017-01-11formula_installer: don't assume requirement dependency is default formula.Mike McQuaid
2016-12-31formula: make prefix usually return opt_prefix.Mike McQuaid
Return `opt_prefix` if it exists and `prefix` is not called from within the same formula's `install` or `post_install` methods. Otherwise, fall back to the existing functionality. This avoids the need to use `opt_prefix` etc. everywhere and generally means we don't expose an implementation detail (i.e. the full Cellar path) to dependents that have a habit of hard-coding it.
2016-12-30formula_installer: optional deps version check.Mike McQuaid
Require `HOMEBREW_CHECK_RECURSIVE_VERSION_DEPENDENCIES` to be specified (which will be by `brew test-bot`) to avoid this being inflicted on end-users unnecessarily.
2016-12-13formula_installer: prevent version mismatched depsMike McQuaid
Don't allow e.g. the use of `openssl` and `openssl@1.1` in the same dependency tree to avoid runtime failures and general weirdness.
2016-12-10formula_installer: remove dependency_installer.Mike McQuaid
This is no longer needed as the reason it was added (argument sanitisation) is now done properly. Also, remove `skip_deps_check?` in favour of `ignore_deps?` as it too is no longer needed.
2016-12-10Merge pull request #1647 from MikeMcQuaid/fix-dependency-option-handlingMike McQuaid
Fix dependency option handling.
2016-12-10Merge pull request #1642 from MikeMcQuaid/always-output-optionsMike McQuaid
reinstall/upgrade/install: always output options.
2016-12-10Fix dependency option handling.Mike McQuaid
- formula_installer: only recompute dependencies when necessary i.e. when a bottle pour fails. - formula_installer: re-add accidentally remove dependency options - dependency: missing options are only those that actually exist on a formula
2016-12-10reinstall/upgrade/install: always output options.Mike McQuaid
This is both easier for debugging and to communicate with users what is being done.
2016-12-09formulary: remap deprecated options from keg.Mike McQuaid
When reading a building a formula from a keg (rather than e.g. from name) then the deprecation options were not remapped correctly as they are only done in `Tab.for_formula` and not `Tab.for_keg`. Ensure that after we’ve created the formula that the `used_options` are remapped correctly.
2016-11-20install: print nothing if `@requirement_messages` is a String or nilKaito Udagawa
2016-11-19install: suppress redundunt warnings with `depends_on` requirementKaito Udagawa
When a formula depends on any requirements, they evaluated at most three times: before locking, before installing dependent, before building formula. When a non-fatal requirement is specified and thus evaluated three times, mostly the same warning message is also emitted three times. This change restricts printing the warning messages only when a bottle is successfully installed or before building. Since this timing is after the final dependency computation for each cases, the warnings will be most useful to check what is not yet satisfied.
2016-11-13No if/unless-modifier on multiline blocks.Markus Reiter
2016-11-13Merge pull request #1217 from MatzFan/invalid_build_option_warningsMike McQuaid
Invalid build option warnings - supersedes #1088
2016-11-12Filter formula build options based on those that exist.Mike McQuaid
If `--with-foo` is provided to a formula through a tab or through another formula depending on it and this option does not exist it should be filtered. If it is not (the prior behaviour) then this can prevent bottles being used unnecessarily. Fixes #1399.
2016-11-12@MikeMcQuaid requested changesBruce Steedman
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-03invalid build options - fixed conflicts; renameBruce Steedman
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.