4907 Commits

Author SHA1 Message Date
Max R
a5abea4fa2 Support brew cleanup --quiet
I was looking for a way to suppress output in `brew cleanup` especially the `Warning: Skipping XXX: most recent version X.Y.Z not installed`. I noticed that `Homebrew::Cleanup#clean` takes a `quiet` argument, but `brew cleanup` doesn't pass one in. This PR updates `brew cleanup` to accept and forward along a `quiet` argument.
2023-07-13 14:45:43 -04:00
Carlo Cabrera
8c72df5213
Merge pull request #15643 from carlocab/cache-bottle-tag
cmd/--cache: undeprecate `--bottle-tag`
2023-07-11 01:52:42 +08:00
Bo Anderson
623eeb4e47
cmd/update-report: tweak messages for CI 2023-07-07 21:10:21 +01:00
Bo Anderson
8f13cfc529
cmd/update: adjustments for setup-homebrew in brew CI 2023-07-07 19:53:50 +01:00
Carlo Cabrera
f44e74dc34
cmd/--cache: undeprecate --bottle-tag
This is useful for quickly examining bottles with something like

    brew fetch --bottle-tag=$tag $formula && \
      tar xf "$(brew --cache --bottle-tag=$tag $formula)"

See discussion at #15632.
2023-07-07 15:09:21 +08:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Mike McQuaid
28817dfe6c
cmd/update-report: use api_auto_update_secs default.
Otherwise this can be printed incorrectly.

As reported in https://github.com/Homebrew/brew/pull/14592#issuecomment-1623578695
2023-07-06 13:58:24 +01:00
Bo Anderson
8d1aabba81
tap: warn if tapping core taps under API mode 2023-07-05 21:57:00 +01:00
Mike McQuaid
66fc022106
Merge pull request #14592 from MikeMcQuaid/env_update_prompts
cmd/update-report: nudge people to tweak settings.
2023-07-05 18:28:34 +01:00
Mike McQuaid
b64ed9dc58
cmd/update-report: nudge people to tweak settings.
Nudge people who have set update or analytics related settings to change
them and to run `brew untap` for taps they no longer need.
2023-07-05 17:18:26 +01:00
Mike McQuaid
27dda52a5d
Download tap_migrations.json files from the API
Download the previously stored tap migrations files for homebrew/core
and homebrew/cask from the formulae.brew.sh API.

This adds a much longer stale time (24 hours) to decide whether or not
the migrations files need downloaded from the API in Ruby land.
`brew update` will still update them every time.

Requires https://github.com/Homebrew/brew/pull/15628
Fixes https://github.com/Homebrew/brew/issues/14897
2023-07-05 17:18:12 +01:00
Mike McQuaid
93a6335c30
cmd/update: update homebrew/core and homebrew/cask with devcmdrun.
If those folks have this tapped and explicitly run `brew update`:
let's update it from them.
2023-07-04 15:50:59 +01:00
Mike McQuaid
a5a728a4df
Merge pull request #15566 from Bo98/dep-refactor
Refactor some dependency handling to fix various API dependency issues
2023-07-04 14:58:11 +01:00
Bo Anderson
71d51faa55
Introduce tag for implicit dependencies 2023-07-04 13:40:58 +01:00
Bo Anderson
7e1efd61a5
cmd/update: don't fetch core taps on manual brew update 2023-07-03 20:03:17 +01:00
Bo Anderson
fa0ccdb3ba
cmd/postgresql-upgrade-database: fix brew not being found 2023-07-03 04:17:36 +01:00
John Britton
24c014b506
Fix single process logic in rbenv-sync and nodenv-sync 2023-06-29 09:54:18 -04:00
John Britton
03b455f460
cmd/pyenv-sync: add new command.
Similar to `rbenv-sync` and `nodenv-sync`, but for use with `pyenv`.

Python has separate formulae for minor Python versions, as such this
will symlink all patch versions to the latest minor version.
2023-06-29 09:37:56 -04:00
Mike McQuaid
20dfa3694b
cmd/update.sh: always move names*.txt files.
Move the `names*.txt` files even when the file size hasn't changed
(which can happen when the versions change in the API but the file
size doesn't change).

Fixes #15217

While we're here, also add some whitespace for easier reading.
2023-06-27 17:30:27 +01:00
Bo Anderson
4b48ea4509
cmd/update.sh: fix some fflags throwing errors on update report 2023-06-22 15:18:14 +01:00
Mike McQuaid
5fdd7f15d9
Merge pull request #15578 from Bo98/faster-install
Significantly improve install speeds with smarter postinstall detection
2023-06-22 12:36:26 +01:00
Bo Anderson
8dc2e80a98
Significantly improve install speeds with smarter postinstall detection 2023-06-22 03:06:45 +01:00
Bo Anderson
55419bfd8b
Allow bump commands to auto-update core tap clones 2023-06-22 01:39:55 +01:00
wickles
45cfb12a98 cmd/leaves: add missing cask dependency 2023-06-20 09:38:24 -07:00
Mike McQuaid
5424cdfffd
cmd/leaves: tweak wording. 2023-06-20 14:43:42 +01:00
hyuraku
3df4fa6803 remove cask's depencies from brew/leaves 2023-06-20 22:37:39 +09:00
Mike McQuaid
cd313adbe4
cmd/info: add (undocumented) --github-packages-downloads option.
This screen scrapes GitHub Packages download counts from HTML for a
core formula.

It's useful when figuring out the difference between our analytics
numbers (which people can opt-out of) and our bottle downloads (which
people cannot due to the way GitHub Packages works).
2023-06-16 15:39:49 +01:00
Mike McQuaid
75dd070395
Remove Google Analytics
We are now entirely migrated to InfluxDB so can remove all GA code.
2023-06-16 10:33:15 +01:00
Mike McQuaid
2f63d26601
Merge pull request #15471 from Omoeba/fix-noncore
Fix `brew formulae` and `brew casks` when the API is used
2023-05-25 12:18:20 +01:00
Omoeba
b43ed6e765
cmd/formulae,cmd/casks: include casks/formulae in local non-core taps when the API is used
Fixes #15229
2023-05-25 01:49:21 -07:00
Markus Reiter
cc8025d16e
Merge pull request #15470 from reitermarkus/readall-os-arch
Add `--os` and `--arch` flags to `readall`.
2023-05-24 23:06:43 +02:00
Markus Reiter
4cffb51b80
Fix wrong method in --cache and fetch. 2023-05-22 22:09:17 +02:00
Markus Reiter
d55f1b85bf
Add --os and --arch flags to readall. 2023-05-20 20:11:31 +02:00
Markus Reiter
e9bfcb9296
Merge pull request #15225 from reitermarkus/audit-os-arch
Add `--os=all` and `--arch=all` options for `brew audit`.
2023-05-19 15:03:32 +02:00
Robin Ury
dddec94fd7
Change: --skip-installed to --missing 2023-05-17 14:57:26 -05:00
Robin Ury
9b884942d7
Change: skip-installed description for clarity 2023-05-17 13:59:38 -05:00
Robin Ury
db84725c7b
Fix: strict args exception for uses 2023-05-17 13:53:19 -05:00
Robin Ury
6aa9a0e57b
Add brew deps --skip-installed arg 2023-05-17 13:53:19 -05:00
Markus Reiter
486c3765ce
Add --os=all and --arch=all options. 2023-05-17 15:26:46 +02:00
John Clark
1a6568b566
Update update-report.rb
Error: uninitialized constant Cask::Migrator
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:591:in `block in migrate_cask_rename'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:590:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:590:in `migrate_cask_rename'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:250:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:250:in `output_update_report'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:41:in `update_report'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'
2023-05-14 15:12:11 -04:00
Markus Reiter
a3231a03fa
Implement cask renames. 2023-05-12 21:17:30 +02:00
Carlo Cabrera
69c16739d2
fetch: remove use of args from CLI parser
See discussion at #15382.
2023-05-09 18:07:32 +08:00
Bo Anderson
8e7d4a5bee
cmd/update-report: don't invoke external diff tools 2023-05-09 05:19:55 +01:00
Austin Ziegler
74b50ddc89
Fix small errors in brew shellenv
These were introduced by typos and an incorrect assumption on the last
update of #15358. The last commit had been tested with a parameter, but
had not been re-tested *without* parameter.

Apologies for the error.
2023-05-08 11:06:30 -04:00
Austin Ziegler
8719946036
Allow brew shellenv to accept a shell name param
Resolves #15358

With this change, `brew shellenv` will accept a shell name parameter to
override its default output (based on `/bin/ps`) for advanced use cases
such as with dotfile templating and caching with
[twpayne/chezmoi](https://github.com/twpayne/chezmoi/discussions/2971).
When running under `fish`, this is the output:

```console
$ brew shellenv pwsh
[System.Environment]::SetEnvironmentVariable('HOMEBREW_PREFIX','/opt/homebrew',[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('HOMEBREW_CELLAR','/opt/homebrew/Cellar',[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('HOMEBREW_REPOSITORY','/opt/homebrew',[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('PATH',$('/opt/homebrew/bin:/opt/homebrew/sbin:'+$ENV:PATH),[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('MANPATH',$('/opt/homebrew/share/man'+$(if(${ENV:MANPATH}){':'+${ENV:MANPATH}})+':'),[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('INFOPATH',$('/opt/homebrew/share/info'+$(if(${ENV:INFOPATH}){':'+${ENV:INFOPATH}})),[System.EnvironmentVariableTarget]::Process)
$ brew shellenv
set -gx HOMEBREW_PREFIX "/opt/homebrew";
set -gx HOMEBREW_CELLAR "/opt/homebrew/Cellar";
set -gx HOMEBREW_REPOSITORY "/opt/homebrew";
set -q PATH; or set PATH ''; set -gx PATH "/opt/homebrew/bin" "/opt/homebrew/sbin" $PATH;
set -q MANPATH; or set MANPATH ''; set -gx MANPATH "/opt/homebrew/share/man" $MANPATH;
set -q INFOPATH; or set INFOPATH ''; set -gx INFOPATH "/opt/homebrew/share/info" $INFOPATH;
```

The specific case presented in the mentioned discussion could be
mitigated by an additional level of indirection (`{{ output "fish" "-c"
"'brew shellenv'" | trim }}`), that requires that the running system
have the target shells installed, when they are not strictly necessary
with `brew shellenv`.
2023-05-05 11:50:48 -04:00
Ruoyu Zhong
5d9c3d0432
cmd/update-report: do not fail when tap has no origin
This fixes the following error:

    $ brew update
    Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/foo/homebrew-bar, skipping update!
    Error: HOMEBREW_UPDATE_BEFORE_FOO_HOMEBREW_BAR is unset!
    /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:361:in `initialize'
    /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:187:in `new'
    /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:187:in `block in output_update_report'
    /usr/local/Homebrew/Library/Homebrew/tap.rb:748:in `block (2 levels) in each'
    /usr/local/Homebrew/Library/Homebrew/tap.rb:747:in `each'
    /usr/local/Homebrew/Library/Homebrew/tap.rb:747:in `block in each'
    /usr/local/Homebrew/Library/Homebrew/tap.rb:746:in `each'
    /usr/local/Homebrew/Library/Homebrew/tap.rb:746:in `each'
    /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:160:in `output_update_report'
    /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:40:in `update_report'
    /usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'
    Already up-to-date.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-05-01 23:37:01 +08:00
Douglas Eichelberger
6bc94abadc Remove delegation of ReporterHub#empty? 2023-04-27 08:13:51 -07:00
Bo Anderson
a696bd8203
Support multiple oldnames for formulae 2023-04-27 05:15:43 +01:00
Douglas Eichelberger
08af78a2a5 brew style --fix 2023-04-25 09:26:24 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00