brew: `brew cleanup` fails when cask is defined in multiple taps
- are reporting a bug others will be able to reproduce and not asking a question. If you’re not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh (https://discourse.brew.sh/t/brew-cleanup-chokes-cask-adoptopenjdk8-exists-in-multiple-taps/4786)
- ran a
brewcommand and reproduced the problem with multiple formulae? If it’s a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it’s abrew caskproblem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it’s a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap. - ran
brew updateand can still reproduce the problem? - ran
brew doctor, fixed all issues and can still reproduce the problem? - ran
brew configandbrew doctorand included their output with your issue?
$ brew config
HOMEBREW_VERSION: 2.1.2-12-g37f4b92
ORIGIN: https://github.com/Homebrew/brew
HEAD: 37f4b92644a255ef76e2e1c9df686211f610e82e
Last commit: 31 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: cedba1f1b4daf1605ff985fcaa7995fe2eb0f527
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_VISUAL: subl -w
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1001
Git: 2.21.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 11.0.3, 1.8.0_212, 1.8.0_202
macOS: 10.14.4-x86_64
CLT: 10.2.1.0.1.1554506761
Xcode: N/A
CLT headers: 10.2.1.0.1.1554506761
$ brew doctor
Your system is ready to brew.
What you were trying to do (and why)
- I added both homebrew/cask-versions and adoptopenjdk/openjdk as taps
- In the past I installed adoptopenjdk8 via the adoptopenjdk tap. Now it is available in cask-versions as well.
- I run the following once in a while:
brew cask upgrade
brew upgrade
brew cleanup
- Because the cask adoptopenjdk8 is available in both taps, I get:
$ brew cleanup
Error: Cask adoptopenjdk8 exists in multiple taps:
homebrew/cask-versions/adoptopenjdk8
adoptopenjdk/openjdk/adoptopenjdk8
- As I installed adoptopenjdk8 initially without a tap prefix, I already ran
brew cask uninstall adoptopenjdk/openjdk/adoptopenjdk8andbrew cask install adoptopenjdk/openjdk/adoptopenjdk8afterwards. But the error persists.
Another thing I do not understand:
$ brew cask list --full-name
adoptopenjdk8
apache-directory-studio
fliqlo
knockknock
vagrant
virtualbox
virtualbox-extension-pack
adoptopenjdk/openjdk/adoptopenjdk11
As can be seen adoptopenjdk11 is (correctly?!?) prefixed with the tap, but adoptopenjdk8 is not.
What happened (include command output)
brew cleanupfails.- Even worse it seems that even
brew upgradefails sometime, there seems to be a sort of automatic cleanup which happens after a specific amount of days:
$ brew upgrade
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.
==> Upgrading 1 outdated package:
derailed/k9s/k9s 0.6.5 -> 0.6.6
==> Upgrading derailed/k9s/k9s
==> Downloading https://github.com/derailed/k9s/releases/download/0.6.6/k9s_0.6.6_Darwin_x86_64.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/167596393/718b3c80-723e-11e9-82df-3ff559a7fde5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190509%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190509T
######################################################################## 100.0%
🍺 /usr/local/Cellar/k9s/0.6.6: 5 files, 39.8MB, built in 6 seconds
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/k9s/0.6.5... (5 files, 39.8MB)
Error: Cask adoptopenjdk8 exists in multiple taps:
homebrew/cask-versions/adoptopenjdk8
adoptopenjdk/openjdk/adoptopenjdk8
What you expected to happen
I can run brew cask upgrade && brew upgrade && brew cleanup successfully.
Step-by-step reproduction instructions (by running brew commands)
- I actually did not remove
brewcompletely, but as far as I understand this should reproduce this.
brew tap homebrew/cask-versions
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
brew cleanup # <-- chokes
See AdoptOpenJDK/homebrew-openjdk#106 as well.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 17 (13 by maintainers)
@MikeMcQuaid Yes, we absolutely need to fix this.
In the meantime, the issue can be worked around by removing the cached download:
@Archez, you seem to have an old tap, run
brew untap caskroom/versions.The same thing is happening for the
chromedriver-betacask as well.chromedriverexists onhomebrew/caskchromedriver-betaexists onhomebrew/cask-versionsandcaskroom/versionsWhat happens in my case is I just want to install
chromedriver; however, the install fails when it performs the update check as I believe both packages have the same starting string, so the conflict clash happens.This clash happens regardless if I run
brew cask install chromedriverorbrew cask install homebrew/cask/chromedriverso I essentially am unable to install this cask without removing one of the taps that containschromedriver-beta.