Closed ghost closed 1 year ago
~ % brew cleanup --prune 0 Removing: /Users/tim/Library/Caches/Homebrew/external_commands_list.txt... (75B) Removing: /Users/tim/Library/Caches/Homebrew/all_commands_list.txt... (1KB)
This is why. Until it's fixed: don't do that.
I guess the decision for maintainers here is:
1) do we prevent these files from being cleaned up on --prune=0
?
2) do we better handle what happens when these files are not present?
Just FWIW, those two files have been removed by --prune=0 for as long as I can remember (the shell function I use to update then cleanup specifically greps them out from the output), but the fact that brew update does not "recognize" it is up-to-date after removing those two files is more recent? I used to be able to run my function and it printed "Already up-to-date." on the second call, instead of updating again.
If you change the command you run to brew cleanup --prune=1
, then you'll stop having this problem. (As long as it's run only immediately after brew update
.)
Thanks, I've already done that before reporting.
I used to be able to run my function and it printed "Already up-to-date." on the second call, instead of updating again.
Am I going crazy here? I'm not sure how to go about bisecting something like this, is there a way to e.g. roll back the core to some older version and use brew update to only update the lists and formulae/casks but not the rest of brew itself?
Did you guys change something? It seems to behave like it used to again:
% brew update; brew upgrade; brew cleanup -s --prune=0; brew update; brew cleanup -s --prune=0; brew update
Already up-to-date.
Removing: /Users/tim/Library/Caches/Homebrew/external_commands_list.txt... (75B)
Removing: /Users/tim/Library/Caches/Homebrew/all_commands_list.txt... (1KB)
==> This operation has freed approximately 1.2KB of disk space.
Already up-to-date.
Removing: /Users/tim/Library/Caches/Homebrew/external_commands_list.txt... (75B)
Removing: /Users/tim/Library/Caches/Homebrew/all_commands_list.txt... (1KB)
==> This operation has freed approximately 1.2KB of disk space.
Already up-to-date.
%
No more re-listing new casks and formulae even after --prune=0
@Rodeo314 nothing changed here recently!
But it makes no sense???
Removing: /Users/tim/Library/Caches/Homebrew/external_commands_list.txt... (75B)
Removing: /Users/tim/Library/Caches/Homebrew/all_commands_list.txt... (1KB)
==> This operation has freed approximately 1.2KB of disk space.
…must not have been the cause of my issue then?
Either way, I feel like I wasted enough of your time. Feel free to close this if you like.
I had a look at this and I don't think brew cleanup
has anything to do with this.
After https://github.com/Homebrew/brew/commit/9de0b619f3eed6e4753c156d0c6ed04b782c4687, brew update-report will always report Homebrew/core
and Homebrew/cask
as updated until the next time the JSON changes*, because the diff between before and after always remains different. This seems to be intentional? Though I find the behaviour a little confusing, particularly given git taps don't behave the same way.
* technically it's until the filesize changes, and many version bumps don't actually change the size of the overall JSON - so the state can stick for hours.
because the diff between before and after always remains different. This seems to be intentional?
This is not intentional 😅
That would explain what I've experienced, I think, and the timing is about right around when I noticed it, if memory serves me correctly.
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
I always run a somewhat aggressive brew cleanup after brew update and/or brew upgrade:
brew update brew cleanup -s --prune 0
As of not too long ago, cleanup seems to do something causing a subsequent brew update to list updated taps again. This is more of a minor annoyance, but it didn't happen until fairly recently, so I am curious as to what changed and reporting just in case there actually might be unexpected behavior / a bug somewhere.
What happened (include all command output)?
What did you expect to happen?
Step-by-step reproduction instructions (by running
brew
commands)