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

I can't untap homebrew/cask and homebrew/core #16761

Closed
3 tasks done
benbor opened this issue Feb 28, 2024 · 12 comments · Fixed by #16766
Closed
3 tasks done

I can't untap homebrew/cask and homebrew/core #16761

benbor opened this issue Feb 28, 2024 · 12 comments · Fixed by #16766
Assignees
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@benbor
Copy link

benbor commented Feb 28, 2024

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: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  dozer

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  python-platformdirs
  [email protected]
  python-distlib

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  mono
  [email protected]
  [email protected]

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.2.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: c6d959218f143cd17b1fc3e0f10f143cbd273528
Last commit: 3 days ago
Core tap JSON: 28 Feb 11:00 UTC
Core cask tap JSON: 28 Feb 11:00 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_NO_AUTO_UPDATE: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.44.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.2-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.2
Rosetta 2: false

What were you trying to do (and why)?

I try to uninstall two taps "homebrew/cask", and "homebrew/core".

What happened (include all command output)?

brew untap homebrew/cask --debug
Error: No available tap homebrew/cask.
Run brew tap --force homebrew/cask to tap homebrew/cask!
/opt/homebrew/Library/Homebrew/cli/named_args.rb:330:in block in to_installed_taps' /opt/homebrew/Library/Homebrew/cli/named_args.rb:329:in each'
/opt/homebrew/Library/Homebrew/cli/named_args.rb:329:in to_installed_taps' /opt/homebrew/Library/Homebrew/cmd/untap.rb:26:in untap'
/opt/homebrew/Library/Homebrew/brew.rb:86:in `

'

What did you expect to happen?

I expect that the "homebrew/cask" tap will be uninstalled successfully

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

> brew tap
homebrew/bundle
homebrew/cask
homebrew/cask-fonts
homebrew/core 

> brew untap homebrew/cask
Error: No available tap homebrew/cask.
Run brew tap --force homebrew/cask to tap homebrew/cask!
@benbor benbor added the bug Reproducible Homebrew/brew bug label Feb 28, 2024
@MikeMcQuaid
Copy link
Member

It's already uninstalled.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
@benbor
Copy link
Author

benbor commented Feb 28, 2024

@MikeMcQuaid thanks for your answer.

Could you please specify how did you figure it out?

command > brew tap shows the following output

> brew tap
homebrew/bundle
homebrew/cask
homebrew/cask-fonts
homebrew/core 

And command brew bundle adds taps homebrew/cask and homebrew/core into Brewfile.
Even I remove this two taps from Brewfile manually, brew bundle cleanup couldn't manage to deal with it

> brew bundle cleanup
Would untap:
homebrew/cask
Run `brew bundle cleanup --force` to make these changes.

> brew bundle cleanup --force
Error: No available tap homebrew/cask.
Run brew tap --force homebrew/cask to tap homebrew/cask!

I'm sure it is still some bug with that two taps in my scenario.

@Bo98
Copy link
Member

Bo98 commented Feb 28, 2024

brew tap behaviour did indeed change in #16710. I agree it is perhaps unclear that brew tap shows things but brew untap says they never existed.

brew bundle cleanup looks like a regression since #16710 involved breaking public API changes so everything that used it probably needs checking.

@MikeMcQuaid
Copy link
Member

@benbor Apologies that I saw all except that they were still listed by brew tap.

@reitermarkus can you fix this regression, thanks.

@benbor
Copy link
Author

benbor commented Feb 28, 2024

@MikeMcQuaid No problem

Thank you so much for maintaining Homebrew! Your hard work makes my daily routine much easier

@reitermarkus
Copy link
Member

Will take a look.

So I guess it's only the error message that is unclear? Basically, you cannot untap homebrew/cask because it's always available when using the API.

@Bo98
Copy link
Member

Bo98 commented Feb 28, 2024

It's well-documented that running brew tap on homebrew/core|cask will give you a local git clone so the concept of "tapped" has largely been around that concept of having a local git clone. Similarly you run brew untap to get rid of a local git clone and return to API-only state. So it's a bit confusing that the brew tap list doesn't reflect the same idea and that you can run brew tap again on something from that list to actually fully install it.

brew bundle also seems to also now not work in API-only mode properly after the changes and thinks it needs to do a brew tap/untap.

@reitermarkus
Copy link
Member

So should we only show taps that have a local clone, or show something like

homebrew/core (using API)

?

@Bo98
Copy link
Member

Bo98 commented Feb 28, 2024

I'd say show taps with local clone. If you want API information, it maybe could be added with --verbose - I'm cautious adding it in regular output given brew tap is machine-parsable, as demonstrated by how $(brew tap) is used in our zsh completions and in many other places around the internet: https://github.com/search?q=%22%24%28brew+tap%29%22&type=code

@madAndroid
Copy link

It appears that brew bundle dump is still being affected by this issue - the created Brewfile includes:

tap "homebrew/cask"
tap "homebrew/core"

... which means when attempting to install using this created file, I get this error:

Error: No available tap homebrew/cask.
Run brew tap --force homebrew/cask to tap homebrew/cask!

@madAndroid
Copy link

I've worked around the issue for now using:

brew tap --force homebrew/core
brew tap --force homebrew/cask

... but it would be good if brew bundle dump didn't create those entries in the Brewfile

@MikeMcQuaid
Copy link
Member

... but it would be good if brew bundle dump didn't create those entries in the Brewfile

Opened Homebrew/homebrew-bundle#1317 to address this.

strayer added a commit to strayer/dotfiles that referenced this issue Mar 5, 2024
This isn't tapped on modern Homebrew systems and it showing up as tapped
was just a bug: Homebrew/brew#16761
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants