954 Commits

Author SHA1 Message Date
Mike McQuaid
46d727b475
HOMEBREW_INSTALL_FROM_API: various improvements.
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where relevant
- remove some duplicate checks
- better scope checks to just core tap formulae
2023-01-25 14:29:35 +00:00
Mike McQuaid
4cf365f6c9
Merge pull request #14371 from dawidd6/os-specific-service
Allow defining service run command per platform
2023-01-20 15:21:47 +00:00
Sean Molenaar
59ebdab2b7
analytics: switch to InfluxDB for logging 2023-01-19 18:15:27 +01:00
Dawid Dziurla
0d0c98de29
Allow defining service run command per platform 2023-01-19 11:36:37 +01:00
Mike McQuaid
752d1fa114
formula_installer: add comment. 2023-01-04 14:19:22 +00:00
fn ⌃ ⌥
e234fb7542 formula_installer: check if dependencies have already been fetched.
Given a `pkg_a` that depends on `pkg_b`, it is redundant to list
`pkg_b` as a dependency when running the following commands:

- `brew install pkg_b pkg_a`
- `brew upgrade` (when both `pkg_a` and `pkg_b` are outdated)
2023-01-02 14:10:17 -08:00
Nanda H Krishna
fe0eb9b5b0
Fix style issues 2022-12-22 23:52:26 -05:00
Mike McQuaid
77c0d38c35
brew style --fix 2022-12-13 11:37:06 +00:00
Mike McQuaid
5e7c19c8cb
formula_installer: output fetching headers.
This outputs headers for fetching to be consistent with those for
installation.
2022-12-06 14:09:49 +00:00
apainintheneck
d48859a9ce Move FormulaInstaller check to extend/os 2022-11-29 23:13:50 -08:00
Mike McQuaid
59f4b5226a
tests: test on Ubuntu 18.04. 2022-11-09 14:45:43 +00:00
Mike McQuaid
53b1c0f48e
Strengthen "don't create issues" language
We're still getting a non-trivial number of issues from configurations
we don't support and don't plan to.

Let people know that we know their experience will not be good and what
to expect if they file issues.

Co-authored-by: Eric Knibbe <enk3@outlook.com>
2022-10-20 11:39:20 +01:00
Mike McQuaid
6eaa510615
Merge pull request #13842 from Rylan12/api-in-tab
Include `loaded_from_api` key in `Tab`
2022-09-15 09:16:58 +01:00
Rylan Polster
e8f2d8f6c5
Load formulae from their aliases using the API 2022-09-14 23:59:10 -04:00
Rylan Polster
b44f715f82
Include loaded_from_api key in Tab 2022-09-14 22:23:01 -04:00
Bo Anderson
9091ac0dad
Create GCC and glibc symlinks after install is complete
Fixes #13836.
2022-09-09 21:24:45 +01:00
Rylan Polster
8138d52ceb
Don't fallback to building from source with HOMEBREW_INSTALL_FROM_API 2022-09-09 00:38:21 -04:00
Michka Popoff
d271614872
install glibc/gcc automatically if too old.
Right now this is done through the gcc@5 formula.
See 9692318ca6/Formula/gcc%405.rb (L33)

This is fragile because when we will migrate to gcc@11
we have to think about migrating the installation from one gcc formula to another..
Also, not having the right glibc version results in a non-functional brew
installation on an older Linux: the glibc installation needs
to be done by brew, and not by a workaround in a specific formula

Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Co-Authored-By: Bo Anderson <mail@boanderson.me>
Co-Authored-By: Shaun Jackman <sjackman@gmail.com>
2022-08-25 11:04:37 +01:00
Lukas Oberhuber
e46a61e181 rename & inline dsymutil to prepare_debug_symbols 2022-07-30 11:08:52 +01:00
Lukas Oberhuber
a578068dd5 Unlikely but ensures reasonable error 2022-07-26 18:01:22 +01:00
Lukas Oberhuber
91065b9ddd Improve flag passing for debug-symbols 2022-07-26 16:15:26 +01:00
Lukas Oberhuber
d195f22522 Connecting up --debug-symbols flag
This connects the calling of dsymutil and the retention of temporary
files. Still need to connect compilation to flag.
2022-07-26 12:15:53 +01:00
Lukas Oberhuber
e1ea9da507 Conceptual draft of dsym support for macos 2022-07-26 00:00:45 +01:00
Bo Anderson
01d1f1ecb6
Fix Keg.bottle_dependencies including unneeded build dependencies 2022-06-30 04:11:15 +01:00
Bo Anderson
2ddce84225
Remove Keg.relocation_formulae
We no longer use any formulae for relocation.
2022-06-30 03:39:29 +01:00
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