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

Show New/Deleted Formulae/Casks from brew update #14802

Merged

Conversation

MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Feb 24, 2023

If we're installing from the API: we cannot use Git to check for differences in
packages so instead use {formula,cask}_names.txt to do so.

The first time this runs: we won't yet have a base state
({formula,cask}_names.before.txt) to compare against so we don't output
anything and just copy the files for next time.

Fixes #14706

@BrewTestBot
Copy link
Member

Review period will end on 2023-02-27 at 17:30:54 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 24, 2023
@Bo98
Copy link
Member

Bo98 commented Feb 24, 2023

Idea here makes sense, yeah. 👍

@apainintheneck
Copy link
Contributor

This general approach makes sense to me.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 27, 2023
@BrewTestBot
Copy link
Member

Review period ended.

If we're installing from the API: we cannot use Git to check for differences in
packages so instead use `{formula,cask}_names.txt` to do so.

The first time this runs: we won't yet have a base state
(`{formula,cask}_names.before.txt`) to compare against so we don't output
anything and just copy the files for next time.
@MikeMcQuaid MikeMcQuaid force-pushed the update_report_handle_formula_names branch from 37f65b8 to 2451d01 Compare February 28, 2023 16:47
@MikeMcQuaid MikeMcQuaid marked this pull request as ready for review February 28, 2023 16:52
@MikeMcQuaid MikeMcQuaid requested review from apainintheneck, Bo98 and a team February 28, 2023 16:52
@MikeMcQuaid
Copy link
Member Author

This is now ready for review/testing.

Note: because this is only changing the update-report.rb part: if we break something, we can push updates and the latest version on master (or a tag) will be used after the update.sh Bash side updates things.

@apainintheneck
Copy link
Contributor

What would be the best way to test this? I checked this branch out yesterday and ran brew update and then just did the same thing again right now but it looks like no new casks/formulae have been added in that time.

@MikeMcQuaid MikeMcQuaid merged commit 62ee6fa into Homebrew:master Mar 2, 2023
@MikeMcQuaid MikeMcQuaid deleted the update_report_handle_formula_names branch March 2, 2023 14:16
@MikeMcQuaid
Copy link
Member Author

I'm confident enough in this to merge as-is. Should probably follow-up letting people with HOMEBREW_UPDATE_REPORT_ALL_FORMULAE set that it won't work while using the API (therefore probably worth deprecating this setting).

Feel free to revert if this seems to introduce problems.

@RandomDSdevel
Copy link
Contributor

RandomDSdevel commented Mar 2, 2023

Should probably follow-up letting people with HOMEBREW_UPDATE_REPORT_ALL_FORMULAE set that it won't work while using the API (therefore probably worth deprecating this setting).

     No, just do only the former. Folks who set 'HOMEBREW_NO_INSTALL_FROM_API' who've also set 'HOMEBREW_UPDATE_REPORT_ALL_FORMULAE' will still want the latter's behavior.

(Edit: Never mind, I see that this is already what #14866 does; feel free to ignore my comment here.)

@github-actions github-actions bot added the outdated PR was locked due to age label Apr 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2023
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.

brew update should show "New Formulae" and "New Casks" when update from API
6 participants