Skip to content

Downloaded Cask asset symlink creation can error due to length #20678

@samford

Description

@samford

brew doctor output

Your system is ready to brew.

Verification

brew config output

HOMEBREW_VERSION: 4.6.10-63-geda9e78
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: eda9e78529af3c96e40baaee98a3d7a556f9b707
Last commit: 29 minutes ago
Branch: main
Core tap HEAD: 9752b9d057e87bc43c238324442b467f0d8d58fe
Core tap last commit: 5 minutes ago
Core tap JSON: 08 Sep 14:22 UTC
Core cask tap origin: https://github.com/Homebrew/homebrew-cask.git
Core cask tap HEAD: 3c31d99b2ae19cc01c3faace308b261c1a1a0b67
Core cask tap last commit: 7 minutes ago
Core cask tap JSON: 08 Sep 14:25 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DEVELOPER: set
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_LIVECHECK_AUTOBUMP: set
HOMEBREW_MAKE_JOBS: 14
HOMEBREW_NO_ENV_HINTS: set
HOMEBREW_NO_INSTALL_FROM_API: set
HOMEBREW_SORBET_RUNTIME: set
HOMEBREW_UPGRADE_GREEDY: set
Homebrew Ruby: 3.4.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/bin/ruby
CPU: 14-core 64-bit arm_brava
Clang: 17.0.0 build 1700
Git: 2.51.0 => /opt/homebrew/opt/git/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 26.0-arm64
CLT: 26.0.0.0.1.1756965055
Xcode: 26.0
Rosetta 2: false

For what it's worth, I do have Rosetta installed. I'm not sure why it's showing as false but it could have something to do with Tahoe.

What were you trying to do (and why)?

I opened a version bump PR for the qqmusic cask in homebrew/cask (Homebrew/homebrew-cask#225644) but brew audit fails because a symlink can't be created for the downloaded dmg file due to the symlink file name being too long.

What happened (include all command output)?

brew audit displays an error due to the symlink file name being too long:

$ brew audit --online --strict qqmusic
==> Downloading and extracting artifacts
==> Downloading https://c.y.qq.com/cgi-bin/file_redirect.fcg?bid=dldir&file=ecos
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/ab2ba3ac2e9004a8c536c2922f9d6982d845215106b7add72e8b2b0f3a5bb2ab--QQMusicMac10.7.1Build00.dmg
Warning: Removed Sorbet lines from backtrace!
audit for qqmusic: failed
 - exception while auditing qqmusic: File name too long @ rb_file_s_symlink - (../downloads/ab2ba3ac2e9004a8c536c2922f9d6982d845215106b7add72e8b2b0f3a5bb2ab--QQMusicMac10.7.1Build00.dmg, /Users/user/Library/Caches/Homebrew/Cask/file_redirect.fcg?bid=dldir&file=ecosfile%2Fmusic_clntupate%2Fmac%2Fother%2FQQMusicMac10.7.1Build00.dmg&sign=1-0cb9ee4c40e7447e2113cfdee2dc11c88487b0e31fe37cfe1c59e12c20956dce-689e9373--10.7.1,00,1-0cb9ee4c40e7447e2113cfdee2dc11c88487b0e31fe37cfe1c59e12c20956dce-689e9373.dmg)
qqmusic
  * exception while auditing qqmusic: File name too long @ rb_file_s_symlink - (../downloads/ab2ba3ac2e9004a8c536c2922f9d6982d845215106b7add72e8b2b0f3a5bb2ab--QQMusicMac10.7.1Build00.dmg, /Users/user/Library/Caches/Homebrew/Cask/file_redirect.fcg?bid=dldir&file=ecosfile%2Fmusic_clntupate%2Fmac%2Fother%2FQQMusicMac10.7.1Build00.dmg&sign=1-0cb9ee4c40e7447e2113cfdee2dc11c88487b0e31fe37cfe1c59e12c20956dce-689e9373--10.7.1,00,1-0cb9ee4c40e7447e2113cfdee2dc11c88487b0e31fe37cfe1c59e12c20956dce-689e9373.dmg)
Error: 1 problem in 1 cask detected.

This can also be replicated using brew fetch qqmusic (using the aforementioned cask PR branch) for a more isolated test.

What did you expect to happen?

brew audit --online --strict qqmusic should complete without any errors.

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

  1. Check out the related homebrew/cask PR branch (https://github.com/Homebrew/homebrew-cask/tree/qqmusic-10.7.1).
  2. Run brew fetch qqmusic or brew audit --online --strict qqmusic to observe the symlink error.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions