homebrew-cask
homebrew-cask copied to clipboard
upgrade/reinstall induce time-dependent dock and launchpad behavior
- [X] I understand that if I ignore these instructions, my issue may be closed without review.
- [X] I have retried my command with
--force
. - [X] I ran
brew update-reset && brew update
and retried my command. - [X] I ran
brew doctor
, fixed as many issues as possible and retried my command. - [X] I have checked the instructions for reporting bugs.
- [X] I made doubly sure this is not a checksum does not match error.
Description of issue
brew upgrade
and brew reinstall
use the same basic logic for handling Artifacts (Apps) so this applies to both. The issue is that since upgrading to macOS 11 from Mojave, I have noticed that some apps are being removed from Dock during brew upgrade
. They also remove themselves from Launchpad and are then restored to the end position, but this has been the 'expected' behavior since brew cask upgrade
came around. A messy Launchpad I can live with, begrudgingly; a dock that loses apps is far from desirable behavior.
Here is how you can reproduce this behavior. I will be using the headset
cask as an example because it is a small and simple app that installs quickly and does not readily produce the bad behavior on my old macbook. I will also use the stress-ng
formula to slow down the upgrade/reinstall process.
-
brew install stress-ng
-
brew install headset
- Pin Headset.app to your Dock and move it somewhere else in Launchpad.
-
brew reinstall headset
should work as expected without removing the app from Dock or moving it in Launchpad. - Now in a separate CLI run a stress test, I am using
stress-ng --cpu 8 --timeout 30s
. -
brew reinstall headset
now during the stress test causes the app to disappear from Dock and Launchpad, and then reappear in Launchpad at the end position. The degree of stress required will likely depend on your system so play with the arguments if this is not sufficient on a more recent device.
I do not propose a solution here. There already exists ample discussion on this behavior elsewhere e.g. in past stale/locked issues. Related issue: https://github.com/Homebrew/homebrew-cask/issues/89497
Command that failed
brew reinstall headset
I use the headset
cask here as an example. Other casks where I have seen this behavior without intentionally inducing it are generally larger apps with bin linking and other complications, e.g. libreoffice
and calibre
.
Output of command with --verbose --debug
Click to expand
> % brew reinstall --verbose --debug headset
==> Cask::Installer#reinstall
==> Cask::Installer#install
==> Printing caveats
==> Cask::Installer#fetch
==> Downloading https://github.com/headsetapp/headset-electron/releases/download/v3.3.3/Headset-3.3.3.dmg
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.9-38-g3466c2d\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.3\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --silent --head --request GET https://github.com/headsetapp/headset-electron/releases/download/v3.3.3/Headset-3.3.3.dmg
Already downloaded: /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
==> /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg is quarantined
==> Verifying checksum for cask 'headset'
hdiutil imageinfo -format /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
==> Uninstalling Cask headset
==> Uninstalling artifacts
==> 2 artifacts defined
#<SortedSet: {#<Cask::Artifact::App:0x00007f8c9c8af608 @cask=#<Cask::Cask:0x00007f8c9c88cbf8 @token="headset", @sourcefile_path=#<Pathname:/usr/local/Caskroom/headset/.metadata/3.3.3/20210326184947.849/Casks/headset.rb>, @tap=nil, @block=#<Proc:0x00007f8c9c88ca90@/usr/local/Caskroom/headset/.metadata/3.3.3/20210326184947.849/Casks/headset.rb:1>, @default_config=#<Cask::Config:0x00007f8c9c88ca68 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/headset>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/headset/.metadata>, @config=#<Cask::Config:0x00007f8c9c164498 @explicit={}, @default={:languages=>["en-US"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/alex/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/alex/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/alex/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/alex/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/alex/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/alex/Library/Fonts>, :servicedir=>#<Pathname:/Users/alex/Library/Services>, :input_methoddir=>#<Pathname:/Users/alex/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/alex/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/alex/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f8c9f950f50 @cask=#<Cask::Cask:0x00007f8c9c88cbf8 ...>, @token="headset", @version="3.3.3", @sha256=#<Checksum:0x00007f8c9c17eed8 @hexdigest="a4d36f21a4981da9df25331056a13fe3701c006b5d1f9fdc8b0269fcd6c74196">, @url=#<URL:0x00007f8c9c17d3f8 @uri=#<URI::HTTPS https://github.com/headsetapp/headset-electron/releases/download/v3.3.3/Headset-3.3.3.dmg>, @verified="github.com/headsetapp/headset-electron/", @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @header=nil, @user_agent=:default, @data=nil, @specs={:verified=>"github.com/headsetapp/headset-electron/", :user_agent=>:default}, @from_block=false, @caller_location="/usr/local/Caskroom/headset/.metadata/3.3.3/20210326184947.849/Casks/headset.rb:5:in `block in load'">, @name=["Headset"], @desc="Music player powered by YouTube and Reddit", @homepage="https://headsetapp.co/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/headset/3.3.3>, @language_eval=nil>>, @source_string="Headset.app", @target_string="", @source=#<Pathname:/usr/local/Caskroom/headset/3.3.3/Headset.app>, @target=#<Pathname:/Applications/Headset.app>>, #<Cask::Artifact::Zap:0x00007f8c9b8cf9b8 @cask=#<Cask::Cask:0x00007f8c9c88cbf8 @token="headset", @sourcefile_path=#<Pathname:/usr/local/Caskroom/headset/.metadata/3.3.3/20210326184947.849/Casks/headset.rb>, @tap=nil, @block=#<Proc:0x00007f8c9c88ca90@/usr/local/Caskroom/headset/.metadata/3.3.3/20210326184947.849/Casks/headset.rb:1>, @default_config=#<Cask::Config:0x00007f8c9c88ca68 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/headset>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/headset/.metadata>, @config=#<Cask::Config:0x00007f8c9c164498 @explicit={}, @default={:languages=>["en-US"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/alex/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/alex/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/alex/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/alex/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/alex/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/alex/Library/Fonts>, :servicedir=>#<Pathname:/Users/alex/Library/Services>, :input_methoddir=>#<Pathname:/Users/alex/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/alex/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/alex/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f8c9f950f50 @cask=#<Cask::Cask:0x00007f8c9c88cbf8 ...>, @token="headset", @version="3.3.3", @sha256=#<Checksum:0x00007f8c9c17eed8 @hexdigest="a4d36f21a4981da9df25331056a13fe3701c006b5d1f9fdc8b0269fcd6c74196">, @url=#<URL:0x00007f8c9c17d3f8 @uri=#<URI::HTTPS https://github.com/headsetapp/headset-electron/releases/download/v3.3.3/Headset-3.3.3.dmg>, @verified="github.com/headsetapp/headset-electron/", @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @header=nil, @user_agent=:default, @data=nil, @specs={:verified=>"github.com/headsetapp/headset-electron/", :user_agent=>:default}, @from_block=false, @caller_location="/usr/local/Caskroom/headset/.metadata/3.3.3/20210326184947.849/Casks/headset.rb:5:in `block in load'">, @name=["Headset"], @desc="Music player powered by YouTube and Reddit", @homepage="https://headsetapp.co/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/headset/3.3.3>, @language_eval=nil>>, @directives={:trash=>["~/Library/Application Support/Headset", "~/Library/Caches/co.headsetapp.app", "~/Library/Caches/co.headsetapp.app.ShipIt", "~/Library/Cookies/co.headsetapp.app.binarycookies", "~/Library/Logs/Headset", "~/Library/Preferences/ByHost/co.headsetapp.app.ShipIt.*.plist", "~/Library/Preferences/co.headsetapp.app.plist", "~/Library/Saved Application State/co.headsetapp.app.savedState"], :signal=>[]}>}>
==> Uninstalling artifact of class Cask::Artifact::App
==> Backing App 'Headset.app' up to '/usr/local/Caskroom/headset/3.3.3/Headset.app'
/bin/cp -pR /Applications/Headset.app /usr/local/Caskroom/headset/3.3.3/Headset.app
==> Removing App '/Applications/Headset.app'
==> Purging files for version 3.3.3 of Cask headset
==> Purging all staged versions of Cask headset
==> Installing Cask headset
==> Cask::Installer#stage
==> Extracting primary container
==> Using container class UnpackStrategy::Dmg for /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
hdiutil attach -plist -nobrowse -readonly -mountrandom /private/tmp/d20210326-24647-1q4mun1 /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
find . -print0
mkbom -s -i /private/tmp/20210326-24647-7ruwvn.list -- /private/tmp/20210326-24647-1dz4crz.bom
ditto --bom /private/tmp/20210326-24647-1dz4crz.bom -- /private/tmp/d20210326-24647-1q4mun1/dmg.OpHAI2 /private/tmp/d20210326-24647-1ioybz8
diskutil eject /private/tmp/d20210326-24647-1q4mun1/dmg.OpHAI2
cp -pR /private/tmp/d20210326-24647-1ioybz8/Headset.app/. /usr/local/Caskroom/headset/3.3.3/Headset.app
chmod -Rf +w /private/tmp/d20210326-24647-1ioybz8
==> Verifying Gatekeeper status of /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
==> /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg is quarantined
==> Propagating quarantine from /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg to /usr/local/Caskroom/headset/3.3.3
/usr/bin/xattr -p com.apple.quarantine /Users/alex/Library/Caches/Homebrew/downloads/2d1817641ad6ea00d16576093ce270f71608ba4fbc93d14cc5aa94d46edb0ef4--Headset-3.3.3.dmg
/usr/bin/xargs -0 -- /bin/chmod -h u\+w
/usr/bin/xargs -0 -- /usr/bin/xattr -w com.apple.quarantine 0181\;605e2c3e\;Homebrew\\x20Cask\;F5658799-439D-4124-8961-FDDCC9C99184
==> Creating metadata directory: /usr/local/Caskroom/headset/.metadata/3.3.3/20210326185029.307
==> Creating metadata subdirectory: /usr/local/Caskroom/headset/.metadata/3.3.3/20210326185029.307/Casks
==> Installing artifacts
==> 2 artifacts defined
#<SortedSet: {#<Cask::Artifact::App:0x00007f8c9f9f1180 @cask=#<Cask::Cask:0x00007f8c9c9542e8 @token="headset", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/headset.rb>, @tap=#<Tap:0x00007f8c9c93f208 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @formula_renames={}, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007f8c9c9541f8@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/headset.rb:1>, @default_config=#<Cask::Config:0x00007f8c9c94c598 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/headset>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/headset/.metadata>, @config=#<Cask::Config:0x00007f8c9f9f27d8 @explicit={}, @default={:languages=>["en-US"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/alex/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/alex/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/alex/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/alex/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/alex/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/alex/Library/Fonts>, :servicedir=>#<Pathname:/Users/alex/Library/Services>, :input_methoddir=>#<Pathname:/Users/alex/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/alex/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/alex/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f8c9f9f2198 @cask=#<Cask::Cask:0x00007f8c9c9542e8 ...>, @token="headset", @version="3.3.3", @sha256=#<Checksum:0x00007f8c9f9f1f68 @hexdigest="a4d36f21a4981da9df25331056a13fe3701c006b5d1f9fdc8b0269fcd6c74196">, @url=#<URL:0x00007f8c9f9f1a40 @uri=#<URI::HTTPS https://github.com/headsetapp/headset-electron/releases/download/v3.3.3/Headset-3.3.3.dmg>, @verified="github.com/headsetapp/headset-electron/", @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @header=nil, @user_agent=:default, @data=nil, @specs={:verified=>"github.com/headsetapp/headset-electron/", :user_agent=>:default}, @from_block=false, @caller_location="/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/headset.rb:5:in `block in load'">, @name=["Headset"], @desc="Music player powered by YouTube and Reddit", @homepage="https://headsetapp.co/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/headset/3.3.3>, @language_eval=nil>>, @source_string="Headset.app", @target_string="", @source=#<Pathname:/usr/local/Caskroom/headset/3.3.3/Headset.app>, @target=#<Pathname:/Applications/Headset.app>>, #<Cask::Artifact::Zap:0x00007f8c9f9f9e70 @cask=#<Cask::Cask:0x00007f8c9c9542e8 @token="headset", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/headset.rb>, @tap=#<Tap:0x00007f8c9c93f208 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @formula_renames={}, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007f8c9c9541f8@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/headset.rb:1>, @default_config=#<Cask::Config:0x00007f8c9c94c598 @explicit={}>, @caskroom_path=#<Pathname:/usr/local/Caskroom/headset>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/headset/.metadata>, @config=#<Cask::Config:0x00007f8c9f9f27d8 @explicit={}, @default={:languages=>["en-US"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/alex/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/alex/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/alex/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/alex/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/alex/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/alex/Library/Fonts>, :servicedir=>#<Pathname:/Users/alex/Library/Services>, :input_methoddir=>#<Pathname:/Users/alex/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/alex/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/alex/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/alex/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f8c9f9f2198 @cask=#<Cask::Cask:0x00007f8c9c9542e8 ...>, @token="headset", @version="3.3.3", @sha256=#<Checksum:0x00007f8c9f9f1f68 @hexdigest="a4d36f21a4981da9df25331056a13fe3701c006b5d1f9fdc8b0269fcd6c74196">, @url=#<URL:0x00007f8c9f9f1a40 @uri=#<URI::HTTPS https://github.com/headsetapp/headset-electron/releases/download/v3.3.3/Headset-3.3.3.dmg>, @verified="github.com/headsetapp/headset-electron/", @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @header=nil, @user_agent=:default, @data=nil, @specs={:verified=>"github.com/headsetapp/headset-electron/", :user_agent=>:default}, @from_block=false, @caller_location="/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/headset.rb:5:in `block in load'">, @name=["Headset"], @desc="Music player powered by YouTube and Reddit", @homepage="https://headsetapp.co/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/headset/3.3.3>, @language_eval=nil>>, @directives={:trash=>["~/Library/Application Support/Headset", "~/Library/Caches/co.headsetapp.app", "~/Library/Caches/co.headsetapp.app.ShipIt", "~/Library/Cookies/co.headsetapp.app.binarycookies", "~/Library/Logs/Headset", "~/Library/Preferences/ByHost/co.headsetapp.app.ShipIt.*.plist", "~/Library/Preferences/co.headsetapp.app.plist", "~/Library/Saved Application State/co.headsetapp.app.savedState"], :signal=>[]}>}>
==> Installing artifact of class Cask::Artifact::App
==> Moving App 'Headset.app' to '/Applications/Headset.app'
/usr/local/Homebrew/Library/Homebrew/shims/scm/git --version
🍺 headset was successfully installed!
Output of brew doctor --verbose
Click to expand
> % brew doctor --verbose
==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL
==> $LOAD_PATHS
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/warning-1.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tapioca-0.4.19/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/spoom-1.0.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thor-1.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-runtime-stub-0.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-sorbet-0.6.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rails-2.9.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.10.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-1.12.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unicode-display_width-2.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-progressbar-1.11.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-ast-1.4.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-wait-0.0.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-sorbet-1.8.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-0.5.6274/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-static-0.5.6274-universal-darwin-14/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-retry-0.6.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-its-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-github-2.3.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-3.10.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-mocks-3.10.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-expectations-3.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-core-3.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-support-3.10.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ronn-0.7.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/regexp_parser-2.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rdiscount-2.2.0.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/rdiscount-2.2.0.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rack-2.2.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/pry-0.14.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.6.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/patchelf-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parlour-6.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-runtime-0.5.6274/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rainbow-3.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parser-3.0.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel_tests-3.6.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel-1.20.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mustache-1.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/method_source-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/webrobots-0.1.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/webrick-1.7.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ntlm-http-0.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/nokogiri-1.11.2-x86_64-darwin/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/racc-1.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/racc-1.5.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mini_portile2-2.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-persistent-4.0.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-digest_auth-1.4.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-3.3.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-data-3.2021.0212/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/http-cookie-1.0.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/hpricot-0.8.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/hpricot-0.8.6
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/elftools-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/domain_name-0.5.20190701/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf-0.1.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf_ext-0.0.7.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/unf_ext-0.0.7.7
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/diff-lcs-1.4.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/connection_pool-2.2.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/commander-4.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/highline-2.0.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/colorize-0.8.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/coderay-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/codecov-0.5.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-0.21.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov_json_formatter-0.1.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-html-0.12.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/docile-1.3.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/byebug-11.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/byebug-11.1.3
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bootsnap-1.7.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/bootsnap-1.7.3
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/msgpack-1.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/x86_64-darwin-14/2.6.0-static/msgpack-1.4.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bindata-2.4.8/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ast-2.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-2.0.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/minitest-5.14.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.8/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/x86_64-darwin20
/Library/Ruby/Site/2.6.0/universal-darwin20
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/x86_64-darwin20
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin20
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/x86_64-darwin20
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20
/usr/local/Homebrew/Library/Homebrew
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Homebrew Version
3.0.9-38-g3466c2d
==> macOS
11.2.3
==> SIP
Unknown (custom configuration)
configuration:
apple internal: disabled
kext signing: disabled
filesystem protections: disabled
debugging restrictions: disabled
dtrace restrictions: disabled
nvram protections: disabled
basesystem verification: enabled
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3875 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (187 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (177 casks)
/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk (47 casks)
/usr/local/Homebrew/Library/Taps/gcenx/homebrew-wine (8 casks)
/usr/bin/xattr
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 formulae are deprecated or disabled.
You should find replacements for the following formulae:
archivemount
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/usr/local/pspdev/bin/psp-config
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
qt
glew
Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting your PATH for example like so:
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
Output of brew tap
> % brew tap
adoptopenjdk/openjdk
buo/cask-upgrade
gcenx/wine
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/cask-versions
homebrew/core
homebrew/services
matt-chapman/python2
Interesting. It seems that after an app has been uninstalled for a few seconds, it will be auto-removed from the Dock. That’s good smart behaviour, which happens to clash with our way of doing things.
I agree this is something that should be fixed, but I also have no immediate solution. Whatever we do is bound to require changes to the upgrade
and/or reinstall
behaviours, so I wouldn’t expect this to be fixed soon.
I’m surprised we didn’t bump into this before. Pinging @Homebrew/brew for ideas.
I’m surprised we didn’t bump into this before.
@vitorgalvao I’ve been experiencing this pretty consistently since we introduced the move-install-delete dance for app
artifacts.
The reason I’ve noticed it early on is that I tend to organize my Launchpad apps in subdirectories (like on iOS), and after brew cask upgrade
the app kept moving back to the top level in Launchpad.
I never bothered to bring it up because I ultimately don’t really use Launchpad very often.
One possible approach to tackle this:
- Move the old artifact and install the new one as usual.
- Fiddle with the correct Apple knobs to convince LaunchServices that the updated app is the same thing as the one we’ve moved, and make it associate its record to the updated app; I’ve noticed a few discussions on how Sparkle interacts with LaunchServices:
- https://github.com/sparkle-project/Sparkle/issues/749
- https://github.com/sparkle-project/Sparkle/issues/508
- https://github.com/sparkle-project/Sparkle/issues/509
- Defer deleting the moved app until we’re sure LaunchServices has finished its paperwork.
@claui's proposed solution makes sense to me.
In https://github.com/Homebrew/homebrew-cask/issues/89497#issuecomment-695155059 @reitermarkus proposed to use rsync --delete
. I am curious why that was not considered any further.
As well as having to put things back in the Dock, there is the issue of a system dialog to click through before being allowed to use any of the apps displaying this beaviour: "Homebrew Cask downloaded this app on [date], etc."
Could this be solved in the same way, or is this just macOS doing what macOS does now?
there is the issue of a system dialog to click through before being allowed to use any of the apps displaying this beaviour
That’s a macOS security feature we go to great lengths to support.
Could this be solved in the same way
As such, there’s nothing to “solve”. You can either complain about the process to Apple via Feedback Assistant or install casks with --no-quarantine
, which you do at your own risk.
Don't do that
wait no
Unsure if this is related but I've noticed updates also may reset/remove notification settings.
For example, I have Slack installed and configured to have a notification dot on the dock icon when receiving messages.
After installing updates that notification no longer works (no dot) and I have to re-configure it through system preferences.
To add to the last comment: Big Sur asks to give the recently upgraded app permission to display notifications, even though permissions were granted for the previously installed version.
Can we prioritise the issue? This does cases inconvenience when use you brew to have the same reproducible environment.
You can definitely prioritize this, let us know when you have a pull request to review.
A brute force but simple approach that works:
defaults export com.apple.dock "/path/to/temporary/file"
# Do the upgrade/reinstall as usual
defaults import com.apple.dock "/path/to/temporary/file"
killall Dock
It makes the Dock “flash” by being killed and reopened, but at least it the result at the end is the desired one.
@vitorgalvao Is it possible to automize this with hooks or something?
@Phlogi, it's been some time since the last post so I'm not 100% if this will be relevant, but you can indeed make a custom shell function that automates the process @vitorgalvao described for keeping the dock consistent with brew upgrade
: here is my solution:
# I like to simplify the upgrade process of both formulae and casks with just
# 'brew upgrade', however, you can also modify this so that the automation only
# runs when the '--greedy' flag is passed.
#
# The 'if' statement checks whether the user ran 'upgrade' with 'brew', AND if
# there are any outdated casks - where it performs the necessary commands to
# preserve the dock icon positions (including flashing when restarting 'Dock'),
# otherwise it just runs the 'brew' command as normal.
if [[ $1 == "upgrade" && `$HOMEBREW_PREFIX/bin/brew outdated --cask --greedy` ]]
then
defaults export com.apple.dock "/tmp/dock-layout.plist"
$HOMEBREW_PREFIX/bin/brew upgrade --greedy
defaults import com.apple.dock "/tmp/dock-layout.plist"
killall Dock
else
$HOMEBREW_PREFIX/bin/brew $@
fi
As an optional extra, you can add the HOMEBREW_CASK_OPTS="--no-quarantine"
if you trust your casks and want to disable quarantine when upgrading them (to prevent Gatekeeper notifications), however, this depends on your own feeling/needs of security (I do so for myself).
Pop the above script as a function in Zsh's fpath
and call it brew
, or if you use something like Bash, in your startup files, and you can use it for brew
then (make sure for Zsh, you autoload
the function in your startup files).
Hope that someone may at least find this useful to them :).
Thanks, as i'm using fish and i don't like the wrapping approach too much, i use the following pragmatic explicit alias:
alias -s brew-greedy-update "defaults export com.apple.dock "/tmp/dock-layout.plist" && brew upgrade --greedy && defaults import com.apple.dock "/tmp/dock-layout.plist" && killall Dock"
Then just call:
brew-greedy-update
@cpolish
Pop the above script as a function in Zsh's
fpath
and call itbrew
, then (make sure for Zsh, youautoload
the function in your startup files).
What is Zsh's fpath
? could you explain that? Also where do I enter the name brew
? is that what I name the text file itself? Lastly, how do I autoload the function in my startup files? Wouldn't adding this script to to .zprofile
or .zshrc
sufice? Sorry for all the questions. I am a noob.
Things going missing from the Dock is manageable, but the problems with Notifications is more frustrating (it isn't obvious in this case). I appreciate there is a brute force workaround for one part of this problem (thanks to @vitorgalvao), lets hope someone with better knowledge of LaunchServices can help with the pointers @claui provided above for a more complete potential fix.
I agree, it's just incredibly aggravating when apps get:
- Unpinned from the dock.
- Lose a custom app icon
- Get reset in Launchpad
- Stop sending notifications
- Sends me a security prompt when opening it
- Sometimes resets internal data
It's fine to deal with these minor things on their own, but it destroys any hopes of any actual auto-upgrade in the background because I'll come back and see some app reset to defaults.
Locking this because this has turned into "post my specific reasons why I too find this annoying" which doesn't help anyone get to the actual solution: someone caring enough to submit pull request to fix it.