Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve updating behaviour #13299

Merged
merged 1 commit into from May 24, 2022

Conversation

MikeMcQuaid
Copy link
Member

  • Rename use of "preinstall" to "auto update". The original "preinstall" naming came from the fact that we used to only auto-update before brew install but now that it's many commands: this is more confusing than useful.
  • Add HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED and remove HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED; the latter is now the default and the prior provides an opt-out for better output, performance and avoiding reading potentially untrusted formulae.
  • Add HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS and don't check formula versions by default for better performance by default.

CC @boblail for thoughts.

@BrewTestBot
Copy link
Member

Review period will end on 2022-05-19 at 19:58:52 UTC.

Library/Homebrew/cmd/update.sh Outdated Show resolved Hide resolved
Library/Homebrew/env_config.rb Outdated Show resolved Hide resolved
@MikeMcQuaid MikeMcQuaid force-pushed the update_improvements branch 4 times, most recently from 3d993ae to 669a746 Compare May 18, 2022 21:03
@samford
Copy link
Member

samford commented May 18, 2022

Outside of the environment variable description mentioned above, this looks good to me. I tested out this branch and I like the configurability the new environment variables allow (they work as expected for my use case).

The installed-only brew update behavior does feel like a sensible default for the average user. As someone who runs brew update several times a day, I'm occasionally surprised at how long some users can go between updates. On the off chance that someone hasn't updated for a while and then runs brew update (instead of brew install or brew upgrade), the installed-only output should be considerably less overwhelming (especially with the increased output from version-changes-only filtering being disabled by default).

Library/Homebrew/env_config.rb Outdated Show resolved Hide resolved
- Rename use of "preinstall" to "auto update". The original "preinstall"
  naming came from the fact that we used to only auto-update before
  `brew install` but now that it's many commands: this is more confusing
  than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
  `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
  and the prior provides an opt-out for better output, performance and
  avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
  versions by default for better performance by default.

Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label May 19, 2022
@MikeMcQuaid MikeMcQuaid merged commit 00c5960 into Homebrew:master May 24, 2022
@MikeMcQuaid MikeMcQuaid deleted the update_improvements branch May 24, 2022 12:05
@boblail
Copy link
Contributor

boblail commented Jun 13, 2022

LGTM!

@github-actions github-actions bot added the outdated PR was locked due to age label Jul 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants