Skip to content

Concurrent download + API: cask reinstall downloads the wrong language #21094

@eduardomozart

Description

@eduardomozart

Verification

Description of issue

Hello guys!
Not sure if I'm opening this issue in the right place. If it happens, please let me know and direct me to the right place.
I have macOS on pt_BR (Portuguese-Brazil) language, but, for some reason, the libreoffice-language-pack cask is downloading the en_GB language pack instead of the pt_BR one, as can be seen on brew install cask log.

Also, I believe that the SilentInstall.sh script could run xattr -d com.apple.quaratine /Applications/LibreOffice.app command to remove the quarantine attribute and upgrade the language pack without having to run LibreOffice first, as a non-US user, every time a new upgrade is released to libreoffice and libreoffice-language-pack casks, I have to manually open LibreOffice to run macOS Gatekeeper and run the brew reinstall --cask libreoffice-language-pack command to install the language pack, which difficult to upgrade the package unattended).

Here's my env command output (as can be seen, LANG is pt_BR):

mac@MacBook-Pro-de-Eduardo ~ % env
TMPDIR=/var/folders/g9/vmpx_nd922v5sfjnb12fm1_h0000gn/T/
__CFBundleIdentifier=com.apple.Terminal
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.fVVAnXTFsE/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
COLORTERM=truecolor
OSLogRateLimit=64
TERM_PROGRAM_VERSION=465
TERM_SESSION_ID=D2AFEC72-97A9-450A-A5A5-3FBD17DA6788
SHELL=/bin/zsh
HOME=/Users/mac
LOGNAME=mac
USER=mac
PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/Users/mac/Library/Python/3.9/bin
SHLVL=1
PWD=/Users/mac
OLDPWD=/Users/mac
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
INFOPATH=/opt/homebrew/share/info:
LANG=pt_BR.UTF-8
_=/usr/bin/env

Command that failed

brew reinstall --cask libreoffice-language-pack

Output of command with --verbose --debug

mac@MacBook-Pro-de-Eduardo ~ % brew reinstall --cask libreoffice-language-pack --verbose --debug
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading libreoffice-language-pack
==> Fetching downloads for: libreoffice-language-pack
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/5.0.1\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 26.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 -V                                               [Downloading  10.1MB/-------]
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/5.0.1\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 26.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 -V
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/5.0.1\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 26.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://raw.githubusercontent.com/Homebrew/homebrew-cask/5eb6f06ee9275a8889562ab23a9fe8019650567a/Casks/l/libreoffice-language-pack.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/5.0.1\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 26.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://download.documentfoundation.org/libreoffice/stable/25.8.3/mac/aarch64/LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/5.0.1\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 26.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET --http1.1 https://raw.githubusercontent.com/Homebrew/homebrew-cask/5eb6f06ee9275a8889562ab23a9fe8019650567a/Casks/l/libreoffice-language-pack.rb
==> Verifying checksum for '4f46b55d33b32ea98fbdc132d063458b0da0fe6c4e3dad8a71e39a6ef9c48758--libreoffice-language-pack.rb'     [Downloading  22.7KB/-------]
✔︎ API Source libreoffice-language-pack.rb                                                                                       [Verifying    22.7KB/ 22.7KB]
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/5.0.1\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 26.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET --http1.1 https://download.documentfoundation.org/libreoffice/stable/25.8.3/mac/aarch64/LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
==> Checking quarantine supportk (25.8.3)                                                                                       [Downloading  10.1MB/-------]
/usr/bin/env /usr/bin/xattr -h
/usr/bin/env /Library/Developer/CommandLineTools/usr/bin/swift -target arm64-apple-macosx26 /opt/homebrew/Library/Homebrew/cask/utils/quarantine.swift10.1MB]
==> Quarantine is available.pack (25.8.3)                                                                                       [Downloaded   10.1MB/ 10.1MB]
==> Verifying Gatekeeper status of /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
/usr/bin/env /usr/bin/xattr -p com.apple.quarantine /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
==> /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg is quarantined
==> Verifying checksum for 'a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg'
✔︎ Cask libreoffice-language-pack (25.8.3)                                                                                       [Verifying    10.1MB/ 10.1MB]
==> Cask::Installer#install
==> Printing caveats
==> Caveats
libreoffice-language-pack cannot be upgraded, instead use:

  brew reinstall --cask libreoffice-language-pack

==> Cask::Installer#fetch
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading libreoffice
==> Verifying Gatekeeper status of /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
/usr/bin/env /usr/bin/xattr -p com.apple.quarantine /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
==> /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg is quarantined
==> Verifying checksum for 'a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg'
/usr/bin/env hdiutil imageinfo -format /Users/mac/Library/Caches/Homebrew/downloads/a1bd8fa5afda1cccc8f4522e412e09199dabb14fc40be1837bf5024921cf9115--LibreOffice_25.8.3_MacOS_aarch64_langpack_en-GB.dmg
All dependencies satisfied.
==> Uninstalling Cask libreoffice-language-pack
==> Uninstalling artifacts
==> 3 artifacts defined
#<Cask::ArtifactSet: {#<Cask::Artifact::PreflightBlock:0x0000000117dfbfe8 @cask=#<Cask libreoffice-language-pack /opt/homebrew/Caskroom/libreoffice-language-pack/.metadata/25.8.3/20251114230749.160/Casks/libreoffice-language-pack.rb>, @dirmethod=nil, @dsl_args=[], @dsl_key=nil, @english_article=nil, @english_name=nil, @sort_order={Cask::Artifact::PreflightBlock => 0, Cask::Artifact::Uninstall => 1, Cask::Artifact::Installer => 2, Cask::Artifact::Pkg => 3, Cask::Artifact::App => 4, Cask::Artifact::Suite => 4, Cask::Artifact::Artifact => 4, Cask::Artifact::Colorpicker => 4, Cask::Artifact::Prefpane => 4, Cask::Artifact::Qlplugin => 4, Cask::Artifact::Mdimporter => 4, Cask::Artifact::Dictionary => 4, Cask::Artifact::Font => 4, Cask::Artifact::Service => 4, Cask::Artifact::InputMethod => 4, Cask::Artifact::InternetPlugin => 4, Cask::Artifact::KeyboardLayout => 4, Cask::Artifact::AudioUnitPlugin => 4, Cask::Artifact::VstPlugin => 4, Cask::Artifact::Vst3Plugin => 4, Cask::Artifact::ScreenSaver => 4, Cask::Artifact::Binary => 5, Cask::Artifact::Manpage => 6, Cask::Artifact::PostflightBlock => 7, Cask::Artifact::Zap => 8}, @directives={preflight: #<Proc:0x0000000123bdea10 /opt/homebrew/Caskroom/libreoffice-language-pack/.metadata/25.8.3/20251114230749.160/Casks/libreoffice-language-pack.rb:516>}>, #<Cask::Artifact::Uninstall:0x0000000117dfbd18 @cask=#<Cask libreoffice-language-pack /opt/homebrew/Caskroom/libreoffice-language-pack/.metadata/25.8.3/20251114230749.160/Casks/libreoffice-language-pack.rb>, @dirmethod=nil, @dsl_args=[{delete: ["/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/libreoffice-language-pack", "/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/SilentInstall.sh"]}], @dsl_key=nil, @english_article=nil, @english_name=nil, @sort_order=nil, @directives={delete: ["/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/libreoffice-language-pack", "/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/SilentInstall.sh"], signal: []}>, #<Cask::Artifact::Installer:0x0000000123bbc780 @cask=#<Cask libreoffice-language-pack /opt/homebrew/Caskroom/libreoffice-language-pack/.metadata/25.8.3/20251114230749.160/Casks/libreoffice-language-pack.rb>, @dirmethod=nil, @dsl_args=[{script: {executable: "/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/SilentInstall.sh", sudo: true}}], @dsl_key=nil, @english_article=nil, @english_name=nil, @sort_order={Cask::Artifact::PreflightBlock => 0, Cask::Artifact::Uninstall => 1, Cask::Artifact::Installer => 2, Cask::Artifact::Pkg => 3, Cask::Artifact::App => 4, Cask::Artifact::Suite => 4, Cask::Artifact::Artifact => 4, Cask::Artifact::Colorpicker => 4, Cask::Artifact::Prefpane => 4, Cask::Artifact::Qlplugin => 4, Cask::Artifact::Mdimporter => 4, Cask::Artifact::Dictionary => 4, Cask::Artifact::Font => 4, Cask::Artifact::Service => 4, Cask::Artifact::InputMethod => 4, Cask::Artifact::InternetPlugin => 4, Cask::Artifact::KeyboardLayout => 4, Cask::Artifact::AudioUnitPlugin => 4, Cask::Artifact::VstPlugin => 4, Cask::Artifact::Vst3Plugin => 4, Cask::Artifact::ScreenSaver => 4, Cask::Artifact::Binary => 5, Cask::Artifact::Manpage => 6, Cask::Artifact::PostflightBlock => 7, Cask::Artifact::Zap => 8}, @args={must_succeed: true, sudo: true, print_stdout: true}, @path=#<Pathname:/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/SilentInstall.sh>, @manual_install=false>}>
==> Uninstalling artifact of class Cask::Artifact::PreflightBlock
==> Uninstalling artifact of class Cask::Artifact::Uninstall
==> Removing files:
/opt/homebrew/Caskroom/libreoffice-language-pack/25.8.3/libreoffice-language-pack
/usr/bin/sudo -E -- /usr/bin/xargs -0 -- /bin/rm -r -f --
Password:
sudo: a password is required

Output of brew doctor and brew config

mac@MacBook-Pro-de-Eduardo ~ % 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:
  angry-ip-scanner
mac@MacBook-Pro-de-Eduardo ~ % brew config
HOMEBREW_VERSION: 5.0.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: e8b7739de9f5dfd154a742e83b2a72ac1222fed2
Last commit: 2 days ago
Branch: stable
Core tap JSON: 14 Nov 23:21 UTC
Core cask tap JSON: 14 Nov 23:21 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DOWNLOAD_CONCURRENCY: 16
HOMEBREW_FORBID_PACKAGES_FROM_PATHS: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.4.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 17.0.0 build 1700
Git: 2.50.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 26.1-arm64
CLT: 26.1.0.0.1.1761104275
Xcode: N/A
Rosetta 2: false

Output of brew tap

(empty)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions