I maintain a python app that we use at my work, and we distribute it for MacOS via brew. Since many of my users don’t have access to our internal github to be able to tap the formula, we simply have them install the bottle direcly from an https url, so installation looks like:
brew install https://internal.site/package-20.8.3.high_sierra.bottle.tar.gz
and for existing users, upgrading looks like:
brew upgrade --force-bottle https://internal.site/package-20.8.3.high_sierra.bottle.tar.gz
And we’ve been doing it this way since July of last year without issues.
Just recently (my first report is from September 8th), users have started reporting that they’re unable to upgrade. I am able to reproduce this on my own machine. If I install the second-most-recent version and then try to upgrade to the most recent, here’s what I get:
~ → brew upgrade --force-bottle https://internal.site/package-20.8.3.high_sierra.bottle.tar.gz Updating Homebrew... ==> Downloading https://internal.site/package-20.8.3.high_sierra.bottle.tar.gz Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/0f81b408d98698220284350f3864ad0bdf78c3bb07b5222207a73d300af3cceb--package-20.8.3.high_sierra.bottle.tar.gz ==> Pouring the cached bottle ==> Downloading https://internal.site/package-20.8.3.high_sierra.bottle.tar.gz Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/0f81b408d98698220284350f3864ad0bdf78c3bb07b5222207a73d300af3cceb--package-20.8.3.high_sierra.bottle.tar.gz ==> Pouring the cached bottle Error: uninitialized constant Cask::CaskLoader::FromURILoader::Cache Please report this issue: https://docs.brew.sh/Troubleshooting /usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:101:in `initialize' /usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:206:in `new' /usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:206:in `block in for' /usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:205:in `each' /usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:205:in `for' /usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:194:in `load' /usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:210:in `warn_if_cask_conflicts' /usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:63:in `block in to_resolved_formulae_to_casks' /usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:60:in `each' /usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:60:in `to_resolved_formulae_to_casks' /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:76:in `upgrade' /usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>' ~ → echo $? ⍉ 1
Perhaps there was some breaking change to the way bottles are handled in homebrew, or perhaps there’s some update needed to my formula?
If I have people uninstall the current version and then install the new version, it works without issue. It’s only upgrading that triggers this.