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

Add HOMEBREW_UPGRADE_GREEDY="auto-updates" and "latest" #16735

Closed
1 task done
jck112 opened this issue Feb 23, 2024 · 5 comments
Closed
1 task done

Add HOMEBREW_UPGRADE_GREEDY="auto-updates" and "latest" #16735

jck112 opened this issue Feb 23, 2024 · 5 comments
Assignees
Labels
features New features outdated PR was locked due to age

Comments

@jck112
Copy link
Contributor

jck112 commented Feb 23, 2024

Verification

Provide a detailed description of the proposed feature

Many users, myself included, prefer to always run brew upgrade --greedy-auto-updates in order to upgrade all of our formulas and casks. Adding support for --greedy, --greedy-latest, and --greedy-auto-updates to the HOMEBREW_CASK_OPTS environment variable enables users to run brew upgrade more easily with their preferred cask upgrade options.

What is the motivation for the feature?

Pull request #15160 added support for the HOMEBREW_UPGRADE_GREEDY environment variable, but deferred adding support for the --greedy-latest and --greedy-auto-updates options. I believe adding support for these additional options via HOMEBREW_CASK_OPTS provides a potentially simpler and more streamlined solution.

How will the feature be relevant to at least 90% of Homebrew users?

As discussed in #15097, there are many users using the --greedy-auto-updates option in particular.

What alternatives to the feature have been considered?

Alternatively new environment variables could be added, e.g. HOMEBREW_UPGRADE_GREEDY_LATEST and HOMEBREW_UPGRADE_GREEDY_AUTO_UPDATES.

@jck112 jck112 added the features New features label Feb 23, 2024
jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 23, 2024
@reitermarkus
Copy link
Member

Given we already have HOMEBREW_UPGRADE_GREEDY, I think it would be better to support HOMEBREW_UPGRADE_GREEDY=auto-updates or HOMEBREW_UPGRADE_GREEDY_AUTO_UPDATES as you already mentioned.

Also, I think we should deprecate HOMEBREW_CASK_OPTS at some point and split it into separate variables for each supported option.

@jck112
Copy link
Contributor Author

jck112 commented Feb 23, 2024

I'm happy to update my pull request with any preferred approach. Do you have a preference between adding HOMEBREW_UPGRADE_GREEDY_AUTO_UPDATES or modifying HOMEBREW_UPGRADE_GREEDY? If the latter, would it be backwards compatible to convert the value to a string and have any value != "auto-updates" imply the --greedy option?

@reitermarkus
Copy link
Member

Let's modify HOMEBREW_UPGRADE_GREEDY to allow auto-updates. This way also only one of the options can be set at a time.

@reitermarkus reitermarkus self-assigned this Feb 24, 2024
jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 24, 2024
@jck112 jck112 changed the title Support --greedy* options in HOMEBREW_CASK_OPTS Add HOMEBREW_UPGRADE_GREEDY="auto-updates" and "latest" Feb 24, 2024
jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 24, 2024
@jck112
Copy link
Contributor Author

jck112 commented Feb 24, 2024

Updated #16736 to modify HOMEBREW_UPGRADE_GREEDY as requested.

jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 24, 2024
jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 25, 2024
jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 25, 2024
@MikeMcQuaid
Copy link
Member

Closing this out as we don't need an issue and PR from same author at same time and to keep conversation in one place. Thanks for the PR @jck112!

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2024
jck112 added a commit to jck112/Homebrew-brew that referenced this issue Feb 26, 2024
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants