954 Commits

Author SHA1 Message Date
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
Connor Mann
b6cb3d2b6a
Add HOMEBREW_NO_INSTALL_UPGRADE 2021-06-10 15:06:12 -04:00
Connor Mann
56e6710064
Upgrade outdated formulae with brew install 2021-06-10 12:53:25 -04:00
Issy Long
155feba8e0
cask/installer: Add Cask caveats to the end-of-operation summary
- Both formulae and casks can have caveats, but only formulae caveats
  were shown at the end of a bulk install/upgrade/reinstall operation
  via `Homebrew.messages.record_caveats`. This fixes that to show Cask
  caveats too, for consistency (scrolling up all of the
  multi-formulae-and-casks output to see caveats is time-consuming and
  users might miss them).
- In doing this I had to change how `Messages#record_caveats` works
  since the cask name is just a string, not an object.
2021-06-09 12:11:51 +01:00
Connor Mann
e75a10fafd
Fix style 2021-06-02 11:21:44 -04:00
Connor Mann
cb78499cd4
Install build deps for --HEAD 2021-06-02 11:13:12 -04:00
Mike McQuaid
6764329684
formula_installer: don't output caveats for dependencies.
If a formula is installed as a dependency (or not on request) then don't
output its caveats.

Inspired by conversation in https://github.com/Homebrew/brew/pull/11367.
Closes https://github.com/Homebrew/brew/pull/11367
2021-05-19 12:11:01 +01:00
Bo Anderson
33e1255f65
formula_installer: write tab when pouring local --only-json-tab bottles 2021-05-11 14:28:12 +01:00
Carlo Cabrera
734defb1a9
Merge pull request #11352 from carlocab/custom-arch
extend/ENV/super: allow bottles with custom architectures
2021-05-10 14:30:41 +01:00
Bo Anderson
a5cb621fb8
tab: add declared_directly field for runtime deps 2021-05-10 05:50:08 +01:00
Carlo Cabrera
e893f16727
extend/ENV/super: allow bottles with custom architectures
Currently, Homebrew recognises only the architectures listed in
`hardware.rb`. [1] Attempting to pass an unrecognised architecture to
`--bottle-arch` while building a bottle returns an error.

Let's change that by passing unrecognised bottle arches to the compiler
instead of immediately failing with a `CannotInstallFormulaError`.

Partially resolves #5815.

[1] 64b6846d60/Library/Homebrew/hardware.rb (L28-L42)
2021-05-09 11:01:48 +01:00
Carlo Cabrera
bf4ad449bb
formula_installer: set HOMEBREW_RELOCATE_RPATHS
This enables `RPATH` relocation upon pouring bottles.

Part of #11329.
2021-05-07 19:40:40 +01:00
Sean Molenaar
157fed329c
service: install linux service file 2021-05-04 16:22:28 +02:00
Mike McQuaid
670bea02c1
formula_installer: don't require unpinning build deps when pouring.
Fixes #11294
2021-04-30 12:17:05 +01:00
Bo Anderson
627381e949
formula_installer: fix version scheme not being set in the tab 2021-04-12 15:48:13 +01:00
Sean Molenaar
4427fa283f
formula: allow plists to be generated 2021-04-08 10:16:57 +02:00
Bo Anderson
a78051d2e0
debrew: make Debrew::Raise only catch uncaught exceptions 2021-04-07 13:41:41 +01:00
Mike McQuaid
04abc51d1f
Cleanup use of CxxStdlib
- remove usage on macOS as we don't care about it there
- don't error out on incompatibility but still store stdlib on Linux
- remove (now) unused methods
2021-04-02 13:55:29 +01:00
Mike McQuaid
d9032ff01a
Download and use tabs from GitHub Packages 2021-04-01 17:37:16 +01:00
Mike McQuaid
d8a2cf9efc
Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
Bo Anderson
22053ca2c3
formula_installer: pass cache key to Dependency.expand 2021-03-29 13:20:18 +01:00
Bo Anderson
929d2d8caf
formula_installer: move deprecation/disabled checking earlier 2021-03-24 15:46:29 +00:00
Bo Anderson
d14a0bb131
Remove FormulaInstaller.prevent_build_flags 2021-03-22 16:11:27 +00:00
Bo Anderson
e49a338896
Implement caching for dependency expansion 2021-03-20 16:56:00 +00:00
Bo Anderson
248ca231a2
formula_installer: don't warn about bottles when active spec is HEAD 2021-03-16 18:22:05 +00:00
Bo Anderson
acfe9d24d9
Merge pull request #10815 from Bo98/fi-more-perf
formula_installer: further reduce dependency calculations
2021-03-15 18:20:03 +00:00