Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.77k stars 9.57k forks source link

removed casks are are displayed as new casks #15036

Closed muescha closed 1 year ago

muescha commented 1 year ago

brew doctor output

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  docker

Warning: You have uncommitted modifications to Homebrew/brew.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /opt/homebrew && git stash -u && git clean -d -f

Uncommitted files:
  ?? Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/public_suffix-4.0.6/data/list.txt

Verification

brew config output

$ brew config
HOMEBREW_VERSION: 4.0.9-35-g65d858d
ORIGIN: https://github.com/Homebrew/brew
HEAD: 65d858da123dda54784a7b374605b6eb1a699882
Last commit: 7 hours ago
Core tap JSON: 23 Mar 02:24 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.85.0 => /usr/bin/curl
macOS: 13.1-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2
Rosetta 2: false

What were you trying to do (and why)?

I run brew cu which shows also new cask and formula

What happened (include all command output)?

I typed brew cu - which runs brew update which this output

$ brew cu
==> Options
Include auto-update (-a): false
Include latest (-f): false
==> Updating Homebrew
==> Updated Homebrew from 4.0.6 (8f6276ed5) to 4.0.9 (65d858da1).
Updated 7 taps (homebrew/cask-versions, homebrew/bundle, homebrew/cask-fonts, homebrew/cask-drivers, peripheryapp/periphery, homebrew/core and homebrew/cask).
==> New Casks
firmaec
wxcrafter
==> Outdated Formulae
asdf
chezmoi
coreutils
difftastic
dolt
exa
gh
node
nushell
openssl@3
sqlite
steampipe
swiftformat
xz
==> Outdated Casks
accessmenubarapps
amitv87-pip
codux
flipper
periphery
smartsynchronize
wooshy

You have 14 outdated formulae and 7 outdated casks installed.
You can upgrade them with brew upgrade
or list them with brew outdated.

The 4.0.9 changelog can be found at:
  https://github.com/Homebrew/brew/releases/tag/4.0.9

==> Finding outdated apps

[...]

What did you expect to happen?

I expected the formulae firmaec and wxcrafter displayed as removed casks. But they are shown as new casks

see:

Step-by-step reproduction instructions (by running brew commands)

in my case i run brew cu but it is calling brew update

muescha commented 1 year ago

what I also see: there are no new casks are displayed (only the removed ones)

MikeMcQuaid commented 1 year ago

What is brew cu and what is it running?

muescha commented 1 year ago

brew cu is this command https://github.com/buo/homebrew-cask-upgrade

at beginning it is running brew update

Now some time is passed so that I can run brew update with new changes:

brew update
Updated 5 taps (homebrew/cask-versions, homebrew/cask-fonts, homebrew/cask-drivers, homebrew/core and homebrew/cask).
==> New Casks
starleaf
muescha commented 1 year ago

I see #15038 is a fix

But did you check also why the "new casks" are not shown as "deleted casks" in the output? I guess this would be still a problem.

MikeMcQuaid commented 1 year ago

@muescha Will need to see reproductions that run brew update directly. I can't really do any more with lack of reproduction information here, sorry.

muescha commented 1 year ago

at least i miss one app since 2023-03-19: https://github.com/Homebrew/homebrew-cask/pulls?q=is%3Apr+sort%3Aupdated-desc+label%3A%22new+cask%22+is%3Aclosed+merged%3A%3E%3D2023-03-19

and much more since 2023-03-11 https://github.com/Homebrew/homebrew-cask/pulls?q=is%3Apr+sort%3Aupdated-desc+label%3A%22new+cask%22+is%3Aclosed+merged%3A%3E%3D2023-03-11

which are not show up at brew upgrade (which should be visible as "flipped" in the "deleted cask" section)

muescha commented 1 year ago

since brew cu runs Cask.brew_update i did not expect an different behaviour about the new casks:

https://github.com/buo/homebrew-cask-upgrade/blob/8239f3b7063f0cea966bc822cab34f741dd8a8e0/lib/bcu/command/upgrade.rb#L28