879 Commits

Author SHA1 Message Date
Bo Anderson
e78665f4f7
Replace ENV["HOME"] with Dir.home 2022-06-17 19:47:57 +01:00
Bo Anderson
0a1762bd14
Use RUBY_PATH and HOMEBREW_RUBY_EXEC_ARGS more universally 2022-06-17 19:47:56 +01:00
Bo Anderson
50437ca07e
Clear cached curl path where HOMEBREW_CURL changes 2022-06-17 19:47:55 +01:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00
danielnachun
3aaef294f6
formula_installer: add check for HOMEBREW_RELOCATE_BUILD_PREFIX 2022-04-28 12:49:11 -07:00
Daniel Nachun
97b0162541
Merge pull request #13138 from danielnachun/patch_prefix3
Binary patching of build prefixes
2022-04-13 13:32:01 -07:00
EricFromCanada
774537d3c2
formula_installer: handle unexpected .brew presence/absence 2022-04-13 10:53:57 -04:00
danielnachun
4de01663bc
formula_installer.rb: call relocate_build_prefix 2022-04-12 15:53:04 -07:00
Bo Anderson
ebda92f908
Revert "Binary patching of build prefixes " 2022-03-21 18:22:36 +00:00
danielnachun
bff8c9aca8
formula_installer.rb: call relocate_build_prefix 2022-03-12 17:46:08 -08:00
hyuraku
ff54a79933 remove useless attr_writer 2022-03-07 21:22:07 +09:00
Issy Long
8b7a9a2430
formula_installer: Fix --only-dependencies formula arch handling
- For a formula with an architecture requirement and a user requesting
  `--only-dependencices` to be installed, this now proceeds to install the
  formula dependencies regardless of the requested formula architecture because
  the formula itself will never be installed.
- The way dependencies and requirements are computed, the `depends_on :arch` is
  still a dependency, so it's in the list of formula dependencies to check and
  potentially install. Hence, we have to remove from the list the dependent
  from `recursive_requirements` with the same name as the formula so that there
  are no confusing unsatisfied requirements for the named formula when we don't
  need it to be installed.
- I thought about why this might be, maybe it's because we can't guarantee that
  formula dependencies work on different architectures. But in that case they'd
  have their own architecture requirements, so we'd see the failure for them.
  So I don't know of any more reasons.

Before:

```shell
$ brew install --only-dependencies julia
julia: The x86_64 architecture is required for this software.
Error: julia: An unsatisfied requirement failed this build.
```

After:

```shell
❯ brew install --only-dependencies julia
==> Downloading [...]
==> Installing dependencies for julia: libnghttp2, mpfr and suite-sparse
```
2022-03-06 21:33:43 +00:00
Mike McQuaid
a37f24f439
Revert "Binary patching of build prefixes" 2022-02-14 10:55:08 +00:00
danielnachun
84de30b653
formula_installer.rb: call relocate_build_prefix 2022-02-10 22:48:45 -08:00
Carlo Cabrera
57fae524de
extend/os/mac/keg_relocate: fix duplicate RPATH handling
ruby-macho chokes on changing duplicate RPATHs, so we need to strip the
duplicates before trying to relocate them.

This continues #11405. We need this to unblock
Homebrew/homebrew-core#91224.

While we're here, let's get rid of `HOMEBREW_RELOCATE_RPATHS`. We've
been using it for nearly a year with essentially no problems (barring
`pdnsrec`), so I think it is safe to do unconditionally.
2022-01-18 15:21:05 +08:00
Bob Lail
9b678c365b Add flag --overwrite to brew install to govern the keg-linking step
Allows you to avoid the `Keg::ConflictError` recommending that you invoke `brew link --overwrite` in scenarios when you know that that's how you'd proceed anyway.
2022-01-10 14:23:33 -06:00
Sean Molenaar
4cb8afeeef
service: add timer support for systemd 2021-11-30 11:05:11 +01:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
EricFromCanada
508b48d19e
formula_installer: preinstall any pre-fetch dependencies 2021-11-09 13:56:40 -05:00
fn ⌃ ⌥
aa6f10ff35 install, upgrade: fetch each formula only once 2021-10-31 10:52:40 -07:00
Rylan Polster
5f4d4fb3fb
Cleanup 2021-10-31 00:27:05 -04:00
Rylan Polster
ae457a8028
Fix loading formulae from core tap 2021-10-30 23:54:01 -04:00
Rylan Polster
268a32f0aa
Handle depends_on "homebrew/core/foo" for HOMEBREW_INSTALL_FROM_API 2021-10-29 14:03:24 -04:00
Rylan Polster
fa4bb7d74a
Refactor audit exception handling 2021-10-21 21:11:05 -04:00
Mike McQuaid
e1120549e5
Cleanup more linuxbrew-core code
- Add the same macOS `--build-from-source` default prefix behaviour
  now we have ~4000 linuxbrew-core bottles.
- Merge remaining useful linuxbrew-core-Maintainer-Guide into
  Homebrew-homebrew-core-Maintainer-Guide
- Don't special-case linuxbrew-core any more in docs
2021-10-21 09:00:22 +01:00
Bo Anderson
5a5a8d58b5
Merge pull request #12275 from Bo98/curl-capath
shims/shared/curl: pass both `--cafile` and `--capath` to override default
2021-10-20 16:28:15 +01:00
Bo Anderson
865c31a166
Set GIT_SSL_CAPATH to override default 2021-10-20 16:01:42 +01:00
Bo Anderson
86b01acd97
formula_installer: don't install bottle deps for all bottles 2021-10-19 16:31:08 +01:00
Bo Anderson
1952d27ba2
Install and use Homebrew's ca-certificates on macOS <= 10.15.5 2021-10-03 17:52:10 +01:00
Bo Anderson
f1e4add444
formula_installer: fix installation of local bottles 2021-09-22 19:36:53 +01:00
Bo Anderson
59dc0ed652
formula_installer: fix error if a compatible bottle was not found 2021-09-20 20:57:39 +01:00
Bo Anderson
b55498269f
Revamp APIs around bottle specifications 2021-09-20 15:02:05 +01:00
fn ⌃ ⌥
0c3afa5837 install, upgrade: run formula installer prelude before fetching 2021-09-10 06:15:55 -07:00
fn ⌃ ⌥
06041f7228 install, upgrade: recompute dependencies before installation 2021-09-08 08:48:21 -07:00
Mike McQuaid
faa56d2118
Merge pull request #11966 from FnControlOption/caveats
messages: record cask installations
2021-09-06 12:33:37 +01:00
EricFromCanada
a0080aa688
formula_installer: update syntax of maximum macOS check 2021-09-03 11:01:21 -04:00
FnControlOption
eb16e10902 messages: record cask installations.
This is used to record installation times and also to determine
whether to display caveats.
2021-09-02 08:44:00 -07:00
Sean Molenaar
391b02f870
formula_installer: install service after linking 2021-07-26 21:13:53 +02:00
Carlo Cabrera
78ad5a870c
formula_installer: add tap_audit_exception stub
`FormulaInstaller` calls `audit_installed` at install time, which
invokes methods in `FormulaCellarChecks`. One of these methods makes a
call to `tap_audit_exception` (cf. #11750), but this method isn't
visible in `FormulaInstaller`.

Instead of trying to replicate the logic of `tap_audit_exception` in
`FormulaAuditor` (or trying to initialise an instance of one to make the
call to `FormulaAuditor`'s implementation of it), let's just implement a
stub that assumes an exception always exists.

I'll need to think a bit about whether this is the right fix for this,
but currently the missing method error is blocking PRs in Homebrew/core,
so let's go with this for now. [1]

[1] e.g. Homebrew/homebrew-core#81388, Homebrew/homebrew-core#81582
2021-07-21 15:46:04 +08:00
Sam Ford
0752d25125
OS::Mac: Move version methods into ::Version 2021-06-23 09:03:46 -04:00
Nanda H Krishna
35e5c8a612
formula_installer: add fallback to use tap formula
The keg formula isn't present in some old bottles. Use the tap
formula as a fallback when this is the case.
2021-06-18 14:25:34 +05:30
Mike McQuaid
01cd65d09b
Merge pull request #11525 from cnnrmnn/install-upgrade-outdated
Automatically upgrade installed but out of date formulae with `brew install`
2021-06-16 11:18:22 +01:00
Connor Mann
79f9a9aac6
Move install-specific code to install.rb 2021-06-15 15:59:00 -04:00
Nanda H Krishna
c70bcd53f7
formula_installer: minor refactoring 2021-06-15 17:30:38 +05:30
Nanda H Krishna
b9d64fed4d
formula_installer: restrict use of Formula from Keg 2021-06-15 03:19:24 +05:30
Connor Mann
4b59636ae8
Merge branch 'master' into install-upgrade-outdated 2021-06-14 11:16:20 -04:00
Nanda H Krishna
a0dfe4aa18
formula_installer: use formula from Keg for local bottle installs
Use the formula file from the Keg if `local_bottle_install` is set,
which means that the formula file from the tap is used for `-s`,
`--HEAD` and normal installs but the formula file present within
formula.prefix/".brew" is used for local bottle installs.
2021-06-11 20:57:51 +05:30
Nanda H Krishna
e6dd13d04e
Revert renaming of tap_git_head 2021-06-11 20:02:31 +05:30
Nanda H Krishna
0735eba995
formula_installer: improve support for local bottle installs 2021-06-11 20:02:30 +05:30