775 Commits

Author SHA1 Message Date
Alyssa Ross
ef82b188f2
Preserve installed_on_request for dependencies
Fixes https://github.com/Homebrew/brew/issues/3642.
2018-01-09 16:37:59 +00:00
Mike McQuaid
73cb1ac265
Merge pull request #3613 from ilovezfs/allow-install-mixed-python-dependency-tree
formula_installer: allow version mismatched python deps
2017-12-30 20:14:53 +00:00
ilovezfs
ba76e06cff formula_installer: allow version mismatched python deps
Dependency trees with both python@2 and python@3 are not inherently
problematic.
2017-12-30 11:35:35 -08:00
Mike McQuaid
b41eb9d306
Merge pull request #3510 from MikeMcQuaid/remove-bottle-hooks
hooks/bottles: remove bottle hooks.
2017-12-10 17:46:10 +00:00
Mike McQuaid
3c6b1daf2b Revert "formula_installer: tweak dependent requirements."
This reverts commit cc752e97f6dcfb3e58c9e753262926672edeb571.

Fixes #1585.

I will open a new issue for the actual underlying bug here (that
requirements aren't being handled correctly based on the stable/devel
spec used at installation time).
2017-12-09 14:23:34 +00:00
Mike McQuaid
f52d69abea
Merge pull request #3539 from MikeMcQuaid/nil_req_dep
formula_installer: handle nil req_dependency.
2017-12-07 17:16:18 +00:00
Mike McQuaid
4ca9831da6 formula_installer: handle nil req_dependency.
Closes #3538.
2017-12-07 16:17:55 +00:00
Mike McQuaid
b9cf7b2bbc formula_installer: avoid irrelevant build deps.
If dependents are already installed ensure their build dependencies (and
requirements) don't end up in the dependency/requirement tree.

Fixes #3033.
2017-12-07 14:56:12 +00:00
Mike McQuaid
0245b2cfea formula_installer: fix default formula prune.
Only prune it if it's not already installed.

Fixes bug with https://github.com/Homebrew/brew/pull/3479
Closes https://github.com/Homebrew/brew/pull/3535.
2017-12-07 08:55:36 +00:00
Mike McQuaid
8bbe9b744f hooks/bottles: remove bottle hooks.
These were removed from Boxen in:
https://github.com/boxen/puppet-homebrew/pull/108
2017-12-01 09:51:10 +00:00
Mike McQuaid
fb6cf0c3f8 More environment filtering fixes
- Make `brew pull` pass through Git environment variables
- Whitelist all `TRAVIS_` variables.
2017-11-27 10:48:03 +00:00
Mike McQuaid
718f52eda4 formula_installer: force fewer default formulae
Don't force a default formulae install if a requirement is satisfied if
we're building a bottle and it's a build-time dependency.
2017-11-25 12:48:30 +00:00
Mike McQuaid
5241d07474 environment filtering: pass through TRAVIS vars.
We use these internally so let's map them to `HOMEBREW_` variables.
2017-11-13 10:01:54 +00:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Shaun Jackman
a4838d22f4 pour_bottle?: Check bottle.compatible_cellar?
formula.bottled? is false when the bottle has no sha256,
as with a local bottle.
2017-09-30 18:25:23 -07:00
Shaun Jackman
c19cc70ac8 FormulaInstaller: Warn when tap version is newer
Warn if a more recent version of this formula is available in the tap.
2017-09-28 12:29:23 -07:00
Shaun Jackman
2e77de3b58 Fix installing a local bottle from source
Factor Utils::Bottles.formula_contents out of BottleLoader.
2017-09-28 12:29:23 -07:00
Shaun Jackman
3ebf282269 pour_bottle?: Fix when formula.bottle is nil
formula.bottle is nil when bottle.compatible_cellar? is false.
Use formula.bottle_specification.compatible_cellar? rather
than formula.bottle.compatible_cellar?.
2017-09-28 12:29:22 -07:00
Mike McQuaid
cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Mike McQuaid
01e9ec9a9f Rubocop: automatic rule fixes. 2017-09-24 21:23:59 +01:00
Mike McQuaid
ffdda0eb9f Tweaks for older Mac OS X versions.
- `brew update` should try to install `curl` before `git` on older
  versions of Mac OS X where it is needed for accessing modern SSL
  certificates.
- We don't need an HTTP mirror for `git` because `curl` will already be
  installed before it is downloaded.
- Don't recommend GCC on Mac OS X versions where it can't be built with
  the default system compiler.
- Start using the Homebrew `curl` on Mac OS X versions where it is
  needed as soon as it is installed.
2017-09-16 12:41:08 +01:00
Shaun Jackman
4cfd333c5a pour_bottle?: Pour local bottles without sha256
Pouring a local bottle for a formula without a bottle sha256
in the formula for that OS would unexpectedly install from
source instead.
2017-08-30 10:17:36 -07:00
Shaun Jackman
008eaac60d pour_bottle?: Ensure local bottles are compatible
Don't ignore f.pour_bottle? and compatible_cellar? when pouring
a local bottle. --force-bottle may be used to pour a local
bottle that is incompatible, as it is for remote bottles.
2017-08-30 10:16:49 -07:00
Mike McQuaid
12c454822a sandbox: stop printing message.
We’re always using the sandbox where possible now so this is just
noise for the vast majority of our users.
2017-08-07 11:16:36 +01:00
Mike McQuaid
eaea27c960 formula_installer: restore build_bottle defaults. 2017-08-05 17:51:47 +01:00
Mike McQuaid
af463a0535 formula_installer: never build dependency bottles.
This also helpfully avoids always building all dependencies from source
when passing `--build-bottle` or forcing all bottles when passing
`--force-bottle`.
2017-07-31 10:36:10 +01:00
Mike McQuaid
044f4d947b Tweak preserve link status on reinstall/upgrade.
Treat a `brew install` command as normal i.e. link by default unless
keg-only and only specify whether a keg should be linked when upgrading
or reinstalling. Also, adjust the naming accordingly so it's more
obvious that this is the case.
2017-07-30 21:44:43 +01:00
Mike McQuaid
9d55446cd0 formula_installer: fix typo. 2017-07-30 20:04:41 +01:00
Mike McQuaid
e1fd69de42 Merge pull request #2961 from MikeMcQuaid/preserve-link-on-upgrade-reinstall
Preserve link status on reinstall/upgrade.
2017-07-30 18:42:06 +01:00
Mike McQuaid
e755505c70 Merge pull request #2969 from MikeMcQuaid/default-formula-bottles
formula_installer: use default_formula for bottles
2017-07-30 18:41:10 +01:00
Mike McQuaid
a83baba8b5 formula_installer: use default_formula for bottles
This was the original, intended functionality before this was broken
in fe117bf79b244c42b7e4049d353c3c003eae4880.

Fixes https://github.com/Homebrew/homebrew-core/issues/13680.
2017-07-30 16:56:24 +01:00
Mike McQuaid
7ec0505200 Preserve link status on reinstall/upgrade.
This means if a user has manually `brew unlink` or `brew link --force`d
something then that status will be preserved after they `brew upgrade`
or `brew reinstall` that formula.

This generally should make things that are keg-only by default easier
to swallow.
2017-07-30 16:20:32 +01:00
Mike McQuaid
b3a96af069 Merge pull request #2959 from MikeMcQuaid/formula-installer-duplication
formula_installer: simplify callers.
2017-07-30 16:03:01 +01:00
Mike McQuaid
e8c4989efb Merge pull request #2923 from MikeMcQuaid/alias-fixes
keg: correctly cleanup old aliases.
2017-07-30 16:02:49 +01:00
Mike McQuaid
b8611bd988 formula_installer: simplify callers.
There's a bunch of duplication going on that's not really necessary.
2017-07-28 15:27:47 +01:00
ilovezfs
deac8f14bb formula_installer: allow version mismatched build deps
Only check runtime dependencies for version conflicts to avoid
having to create unnecessary duplicate formulae.

For example, a formula that needs to be built with ghc@8.0 should still
be allowed to have a build-time dependency on a cabal-install that was
itself built with ghc@8.2.
2017-07-27 08:34:12 -07:00
Mike McQuaid
fe35bb32e8 tab: include aliases.
Including aliases in the tab allows e.g. `brew switch` to correctly
handle switching between different keg’s aliases.
2017-07-21 17:20:54 +01:00
Markus Reiter
3b4ee58c49 Refactor using Forwardable and DelegateClass. 2017-06-28 09:25:31 +02:00
ilovezfs
301a6dc1d9 formula_installer: runtime reqs of build deps are build reqs
so don't consider their absence fatal if we're pouring a bottle.
2017-06-23 08:44:56 -07:00
Mike McQuaid
99c897acad BuildError: report options to analytics.
Without this it's not easy to make much sense of these failures.
2017-06-09 14:53:01 +03:00
Mike McQuaid
5367f1b408 analytics: remove unused analytics.
We didn't end up using the `screenview` and `exception` analytics as
much as expected so let's remove them and focus on stuff that's
formula-specific.
2017-06-07 16:34:54 +01:00
Mike McQuaid
965b7a4be9 Merge pull request #2722 from MikeMcQuaid/formula-installer-show-upgrade-revision
formula_installer: display full upgrade version.
2017-06-03 10:00:57 +01:00
Mike McQuaid
c309ed8d44 formula_installer: display full upgrade version.
Previously this omitted the revision which meant the currently
installed and upgrade version showed as the same.
2017-06-02 22:20:31 +01:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Mike McQuaid
7a38bab333 Fixup all RuboCop warnings. 2017-05-29 18:43:18 +01:00
Mike McQuaid
ef59a751f4 Improve some brew install messaging.
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-27 10:15:37 +01:00
Mike McQuaid
7055abc436 Allow --interactive to access HOME
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-09 20:00:11 +01:00