buo / homebrew-cask-upgrade

A command line tool for upgrading every outdated app installed by Homebrew Cask
MIT License
2.44k stars 90 forks source link

App source not there for Spotify… then OK #165

Closed ppo closed 4 years ago

ppo commented 4 years ago

It seems the App source '/usr/local/Caskroom/spotify/latest/Spotify.dmg' is not there.

Command: brew cu --yes --all --force
Weird thing, when I execute the same command a second time right after, it works. And fails again when executed a third time. And works again the fourth time… I think there's a pattern here :wink:

Odd executions output:

==> Upgrading spotify to latest
==> Downloading https://download.scdn.co/Spotify.dmg
Already downloaded: /Users/ppo/Library/Caches/Homebrew/downloads/5ef9b045e7e6dfeb70b32abfa9ca2da11e85c9b27ab7f6403658ddb1fcfdc00a--Spotify.dmg
==> No SHA-256 checksum defined for Cask 'spotify', skipping verification.
==> Installing Cask spotify
Warning: It seems there is already an App at '/Applications/Spotify.app'; overwriting.
==> Removing App '/Applications/Spotify.app'.
==> Purging files for version latest of Cask spotify
Error: It seems the App source '/usr/local/Caskroom/spotify/latest/Spotify.app' is not there.

Even executions output:

==> Upgrading spotify to latest
==> Downloading https://download.scdn.co/Spotify.dmg
Already downloaded: /Users/ppo/Library/Caches/Homebrew/downloads/5ef9b045e7e6dfeb70b32abfa9ca2da11e85c9b27ab7f6403658ddb1fcfdc00a--Spotify.dmg
==> No SHA-256 checksum defined for Cask 'spotify', skipping verification.
==> Installing Cask spotify
==> Moving App 'Spotify.app' to '/Applications/Spotify.app'.
🍺  spotify was successfully installed!

See also: issue in homebrew-cask

yurikoles commented 4 years ago

Please use search before submitting issues, it was reported many times already.

The problem is that cu uses rewrite of app instead on brew cask reinstall

yurikoles commented 4 years ago

https://github.com/buo/homebrew-cask-upgrade/issues/57

ppo commented 4 years ago

Sorry but #57 don't seem to be the same problem at all. And what keywords could I have used to find these many previous issues?

yurikoles commented 4 years ago

Sorry for being aggressive. But these problems has a common root: cu uses own approach for upgrade instead of standard brew cask reinstall.

ppo commented 4 years ago

I understand :wink: You're deeply in it and I know nothing at all about how it works, I'm just stupidly executing the command. As a user, I don't care about the underlying "why", I just notice "it doesn't work". I reported it to help. Do whatever you want/need with it.

And thank you very much for your work on this project, it's very useful.

ondrejfuhrer commented 4 years ago

@yurikoles @ppo As I can actually reproduce that with Skype, I might revisit that issue and see if I can make that work. So stay tuned 🙂

vitorgalvao commented 4 years ago

cu uses own approach for upgrade instead of standard brew cask reinstall.

The standard isn’t brew cask reinstall, it’s brew cask upgrade.

yurikoles commented 4 years ago

cu uses own approach for upgrade instead of standard brew cask reinstall.

The standard isn’t brew cask reinstall, it’s brew cask upgrade.

@vitorgalvao Is there finally a way to brew cask upgrade casks with auto_updates, while also not upgrading latest as in --greedy?

yurikoles commented 4 years ago

For me upgrading casks with version latest makes no sense, because it seems to not checking the actual artifact update, it always reinstall same cached artifact, which makes no sense.

vitorgalvao commented 4 years ago

Is there finally a way to brew cask upgrade casks with auto_updates, while also not upgrading latest as in --greedy?

What do you mean, “finally”? That’s not a feature we’re pursuing now, and never were. That’s like asking if we can finally make toast. You wanting a feature doesn’t make it desirable for the project, nor is that question related to the conversation (so I don’t get the quoting).

For me upgrading casks with version latest makes no sense, because it seems to not checking the actual artifact update, it always reinstall same cached artifact, which makes no sense.

No, it doesn’t always reinstall the same cached artifact, it gets whatever is latest at the time. Sometimes that’s the same, yes, that’s a consequence of developers giving unversioned URLs and no appcasts. Regarding upgrading latest, we had to pick one or the other and we picked what made more sense to us. You disagreeing about that behaviour doesn’t make it wrong for most people. Nor is it a big inconvenience, seeing as we’re reducing those casks to versioned all the time.

ondrejfuhrer commented 4 years ago

I believe this issue should be also fixed by this: https://github.com/buo/homebrew-cask-upgrade/pull/172

I'll close this issue for now, let me know if you encounter this issue again (or maybe better, create new issue and link it with this one 😉 )

Have a great day!