5321 Commits

Author SHA1 Message Date
Mike McQuaid
2c300cfbe9
brew update core/homebrew-cask taps properly
The existing logic in `update.sh` was both a bit hard to follow and
had some edge cases. Fix this up for improving #15775.
2023-07-28 10:13:57 +01:00
Mike McQuaid
f4760edfbf
Merge pull request #15774 from MikeMcQuaid/update_verboser
cmd/update: output more API information with `--verbose`.
2023-07-27 15:46:53 +01:00
Mike McQuaid
c4f65f2eee
cmd/update: output more API information with --verbose.
Also, hide some spammy/unnecessary newline printing.
2023-07-27 15:20:59 +01:00
Mike McQuaid
21d8f82056
Add/use HOMEBREW_INSTALL_FROM_API_UNSUPPORTED
When we're automatically setting `HOMEBREW_NO_INSTALL_FROM_API`
when on an old macOS version or with a non-default prefix (e.g. cases
where you're going to be mostly building from source).

My initial plan was to set
`HOMEBREW_AUTOMATICALLY_SET_NO_INSTALL_FROM_API` in these cases but
it's used differently enough it made sense to add another internal
variable instead: `HOMEBREW_INSTALL_FROM_API_UNSUPPORTED`.

At the moment this is only used to avoid printing the "You have set
`HOMEBREW_NO_INSTALL_FROM_API`" message inside `brew update` but may
make sense to use in other places over time.

Ideally, we'll get rid of these automatic sets of
`HOMEBREW_NO_INSTALL_FROM_API` and perhaps even the variable entirely.
2023-07-27 12:36:54 +01:00
Mike McQuaid
71a4421c6c
cmd/install: add missing require.
Fixes #15748
2023-07-25 10:08:49 +01:00
Mike McQuaid
a78173b419
Merge pull request #15746 from apainintheneck/install-cmd-should-upgrade-existing-casks
cmd/install: upgrade already installed casks
2023-07-25 08:21:52 +01:00
Douglas Eichelberger
08e46c18cd Add type to Formula attrs 2023-07-24 14:12:36 -07:00
apainintheneck
c9dea04bd4 cmd/install: upgrade already installed casks
Previously, the behavior was to warn users that a cask was already
installed and then skip modifying the installed version. This is
different to how we handled things with formulas. For them we would
upgrade any already installed formulas. This just brings casks in line
with what we already do with formulas.

Changes:
- cmd/install: Upgrade already installed casks if HOMEBREW_NO_INSTALL_UPGRADE
  is not set
- env_config: Update wording of HOMEBREW_NO_INSTALL_UPGRADE to include casks
- remove error that was only used to alert about already installed casks

Note:
- The upgrade command for casks defaults to --greedy when you pass named casks
  to the command which means that this will always default to that behavior
  since you must specify the name of the cask when installing.
2023-07-23 18:50:39 -07:00
Mike McQuaid
21f586c4bf
cmd/{casks,formulae}: handle sharding.
- Allow subdirectories inside `Casks`/`Formula` directories.
- DRY up repeated code with some variables.
2023-07-18 12:57:54 +01:00
Mike McQuaid
a1c9a21548
cmd/tap: remove --list-pinned option.
Not deprecating as it's broken and has been for several major versions.
2023-07-18 10:23:52 +01:00
Mike McQuaid
77061817f7
Fix (again) InfluxDB analytics messaging
Address https://github.com/Homebrew/brew/pull/15688#issuecomment-1638725595

Fixes https://github.com/Homebrew/brew/issues/15678
2023-07-18 08:03:57 +01:00
Mike McQuaid
fb35578c54
Merge pull request #15676 from Bo98/tap-fixes
Introduce CoreCaskTap class and fix cases of core taps were being unnecessarily installed
2023-07-17 19:22:22 +01:00
Bo Anderson
beaa6c32a0
Fix cases of core taps being unnecessarily installed 2023-07-13 20:33:31 +01:00
Bo Anderson
ba02c669e1
Introduce CoreCaskTap class 2023-07-13 20:33:26 +01:00
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