homebrew-cask: brew cask list fails for some formula

Done : pre bug report guide beforehand. Failure to do so might get your issue closed.

Description of issue

The command brew cask list <formula> fails with some casks, I believe this is related to pkg handling, as the issue is visible with formula java7 (java9-beta as well) but not firefox.

Output of brew cask list --verbose java7

~/opensource ○ ❯ brew cask list --verbose java7
Warning: Calling MacOS.release is deprecated!
Use MacOS.version instead.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:71:in `block in load_cask'

Output of brew doctor

~/opensource ○ ❯ 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 and just ignore them. Thanks!

Warning: Your Xcode (7.3) is outdated.
Please update to Xcode 8.0 (or delete it).
Xcode can be updated from the App Store.

Output of brew cask doctor

~/opensource ○ ❯ brew cask doctor
==> macOS Release:
10.11.6
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 1.0.6-22-g47d57ca
Homebrew/homebrew-core (git revision c5f7f; last commit 2016-10-05)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local/Homebrew
==> Homebrew Origin:
https://github.com/Homebrew/brew.git
==> Homebrew-Cask Version:
0.60.0 (git revision f2d4; last commit 85 minutes ago)
==> Homebrew-Cask Install Location:
<NONE>
==> Homebrew-Cask Staging Location:
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads:
/Users/brice/Library/Caches/Homebrew/Cask
0 files, 0B
==> Homebrew-Cask Default Tap Path:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
==> Homebrew-Cask Alternate Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-fonts
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions
==> Homebrew-Cask Default Tap Cask Count:
3366
==> Contents of $LOAD_PATH:
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/Users/brice/.jenv/shims:/Users/brice/.cabal/bin:/usr/local/texlive/2012basic/bin/universal-darwin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/brice/.rvm/bin:/usr/local/Homebrew/Library/Homebrew/cask/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/zsh"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LC_CTYPE="UTF-8"
==> Running As Privileged User:
No

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 34 (25 by maintainers)

Most upvoted comments

So, it’s still not intuitive as to what is wrong here?

Warning: Calling Hbc::DSL#license is deprecated! There is no replacement. /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/dsl.rb:208:in `license’

This started out of the blue - I tend to do upgrades every day or two (worked fine until today) I am not doing any development work. I don’t have any brews or casks called dsl or hbc. I assume that they might be dependencies of something else, but not obvious how to determine what.

brew cask uninstall aegisub && brew cask reinstall aegisub

@keevee09, this won’t do anything, because all casks are still using the license stanza as of now.

So… this is expected behaviour right?

Exactly.

@RandomDSdevel @pquodling @keevee09 @CrCs2O4 The Hbc::DSL#license warning has been removed for now: https://github.com/Homebrew/brew/pull/1241. brew update and you shouldn’t see it anymore.

So… this is expected behaviour right? We just wait for every cask to be relicensed to conform. I can live with that, not pretty but not broken.

@reitermarkus thanks for pointing this out! I cloned my dotfiles from MikeMcQuaid, and there were HOMEBREW_DEVELOPER=1

Now I can live with Warnings not Errors 😃

I am also receiving the Hbc::DSL#license warning. When I run:

$ brew cask list

I get 35 Hbc Warnings; I have 35 casks installed. I have run:

$ brew cask uninstall aegisub && brew cask reinstall aegisub

but

$ brew cask info aegisub

Still gives me the Hbc::DSL#license warning:

Warning: Calling Hbc::DSL#license is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/dsl.rb:208:in `license'

I have also run:

$ brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup

and:

$ cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update

but are still experiencing the warnings.

@CrCs2O4, do you have HOMEBREW_DEVELOPER set? Otherwise this should only result in a Warning, not an Error.

I have the same problem, how to fix the bug?

Error: Calling Hbc::DSL#license is deprecated!
There is no replacement.

No brew dev work

$ git config --get homebrew.devcmdrun

$ git describe --tags
1.0.6-61-gf71e4a7

Yep, this was changed about two months ago.

I installed these casks quite some time ago, maybe 6months ago or even more, could that be the issue?

(Still on a mobile device)

The warnings about MacOS.release only appear if you have an older cask installed that is using it. All current casks are using MacOS.version, so of course you won’t see any warnings about that.

@Brice Dutheil The last line is pointing to the file (path_base.rb) where the warning occurred. It is not an error, just a warning.

On 9 October 2016 at 23:44, Brice Dutheil notifications@github.com wrote:

But what about this one

/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions ± ❯ brew cask list --verbose java7 Warning: Calling MacOS.release is deprecated! Use MacOS.version instead. /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:71:in `block in load_cask’

Should I reinstall the casks? Also is the last line an error? (Not familiar with ruby)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/caskroom/homebrew-cask/issues/25214#issuecomment-252479070, or mute the thread https://github.com/notifications/unsubscribe-auth/AClPq4-6RfgNIKj3qpxnzxjs01RDfGnlks5qyMWJgaJpZM4KOnY4 .

But what about this one

/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions ± ❯ brew cask list --verbose java7
Warning: Calling MacOS.release is deprecated!
Use MacOS.version instead.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:71:in `block in load_cask'

Should I reinstall the casks? Also is the last line an error? (Not familiar with ruby)

Hi, I don’t think as I didn’t check out master. I only used brew commands. I think cask command is now part of the brew repo right? I’m on a mobile device right now but I will update the issue once I’m on my laptop

@vitorgalvao, actually, the MacOS.release warning was already released. But this is only a warning, not an error (unless you have set HOMEBREW_DEVELOPER), so you can either ignore it, or you can reinstall the casks that are using the deprecated methods.