Closed Okeanos closed 4 years ago
Hmm, I cannot reproduce this behaviour locally; my 1password-cli
was listed in brew cask outdated
and I got Installing 1password-cli
as expected. Can you figure out a minimal reproduction case i.e. commands I can run/edits I can make that mean you can reproduce it on any machine? Is it possible that those casks could have been updated between you running brew update
and you running brew cask outdated
?
Thanks for looking into this. I have had this issue with these casks in particular on two separate machines actually. Other casks update just fine (as far as I can tell), e.g. vagrant
or virtualbox
. Would this maybe have anything to do with the casks in question coming from a third party tap?
The commands listed in the initial report were all run within 5 Minutes (multiple times to validate that no updates were in fact applied) after I visited the AdoptOpenJDK/homebrew-openjdk repository and noticed that there were updated available but I hadn't received them.
Would this maybe have anything to do with the casks in question coming from a third party tap?
Yes, it could do. Could you try and create a minimally reproducible Brewfile
based on that?
With the two casks installed previously in the outdated versions with brew cask:
adoptopenjdk11 (11,0.3:7)
adoptopenjdk8 (8,212:b03)
Using the following minimal new Brewfile:
tap "adoptopenjdk/openjdk"
cask "adoptopenjdk/openjdk/adoptopenjdk11"
cask "adoptopenjdk/openjdk/adoptopenjdk8"
has the following results:
$ brew tap
adoptopenjdk/openjdk
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/core
$ brew update
Updated 3 taps (homebrew/core, homebrew/cask and homebrew/bundle).
==> New Formulae
//...
==> Updated Formulae
//...
$ brew bundle
Using adoptopenjdk/openjdk
Using adoptopenjdk/openjdk/adoptopenjdk11
Using adoptopenjdk/openjdk/adoptopenjdk8
Homebrew Bundle complete! 3 Brewfile dependencies now installed.
$ brew bundle check --verbose
The Brewfile's dependencies are satisfied.
$ brew cask outdated
adoptopenjdk11 (11,0.3:7) != 11.0.4,11
adoptopenjdk8 (8,212:b03) != 8,222:b10
Can I see your brew bundle --verbose
output?
Of course, here you go – still using the minimal Brewfile mentioned above.
$ brew bundle --verbose
Skipping install of adoptopenjdk/openjdk tap. It is already installed.
Using adoptopenjdk/openjdk
Using adoptopenjdk/openjdk/adoptopenjdk11
Using adoptopenjdk/openjdk/adoptopenjdk8
Also for good measure:
$ brew --version
Homebrew 2.1.11
Homebrew/homebrew-core (git revision 06579; last commit 2019-10-03)
Homebrew/homebrew-cask (git revision 0f7e78; last commit 2019-10-03)
Is there anything further I can help with? Either by providing additional information or by trying to debug "things" locally? I am by no means an expert in Ruby but I am not averse to getting my hands dirty to try and get this fixed :)
@Okeanos Sorry, I've been too busy to dive in here. You could play around with the cask*
files in https://github.com/Homebrew/homebrew-bundle/blob/master/lib/bundle/ and that might help you towards a PR or figuring out what's wrong to make it easier for me to make one.
I've the same issue... I have to dump a Brewfile, extract the casks and use then as input for brew cask upgrade
. This works:
function brew-upgrade-all() {
# update homebrew
brew update
# create working dir
temp=$(mktemp -d)
brewfile="$temp/Brewfile"
echo "Created temporary directory at $temp"
# create a Brewfile of all installed formulas, casks, taps, mas
brew bundle dump --describe --file="$brewfile"
# upgrade all software from the created Brewfile
brew bundle -v --file="$brewfile"
# upgrade casks since the approach with the brewfile doesnt work
brew cask upgrade $(sed -n -e '/^cask "/p' "$brewfile" |cut -d \" -f2)
# cleanup old versions
brew cleanup
# check if the system is ready to brew
brew doctor
}
brew cask outdated
is empty for me.
I've the same issue
Everyone who follows the reproduction instructions will have the same issue. That's why it's open.
You'll need to either wait for it to get fixed by someone (likely me) or try to work on a fix yourself.
I actually wanted to take a look at debugging/understanding and maybe fixing the issue but I am not too familiar with Ruby on its own and at the same time the repository doesn't appear to have development instructions (that I can see). So sorry for the lack of feedback there :/
brew cask outdated
is empty for me.
@Blackjacx Then it's not the same bug and should be reported to Homebrew/cask.
@Okeanos I still can't reproduce this even by installing the exact casks/taps you've mentioned here. This may have been fixed by another change or it may be something specific about your machine.
If you manage to figure it out the places to look are https://github.com/Homebrew/homebrew-bundle/blob/c38345160e24b252afc1ca0a44daa3ff7dea0c89/lib/bundle/cask_installer.rb#L52-L65 and perhaps https://github.com/Homebrew/homebrew-bundle/blob/c38345160e24b252afc1ca0a44daa3ff7dea0c89/lib/bundle/cask_dumper.rb#L12-L23.
Sorry!
@MikeMcQuaid No worries, thanks for taking the time and dealing with my reports! I'll keep this in mind and will update if anything changes.
By the way, in my case brew update-reset && brew update
before brew bundle install
helped!
I noticed recently that running
brew update
andbrew bundle install
will not update some casks, even though they are outdated.Using the following Brewfile:
yields:
When trying to confirm the veracity of this, the following comes to light:
Which is confirmed when inspecting the casks in question:
I would have thought that
/lib/bundle/cask_installer.rb#L62
applied here and would have correctly identified the outdated casks as perbrew cask outdated
? Did I take a wrong turn somewhere?