chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.34k stars 903 forks source link

Upgrading package causes installers from packages which depend on this package to be run (and fail) #1215

Open flcdrg opened 7 years ago

flcdrg commented 7 years ago

What You Are Seeing?

Upgrading the resharper-platform package seems to trigger running the install scripts for all packages that depend on resharper-platform (eg. dotmemory, resharper, dotcover etc) before resharper-platform has actually downloaded

What is Expected?

Upgrading resharper-platform should not fire install script for other packages that depend on it.

resharper-platform is just an example, this should be a general rule for any dependant package too, I would have thought.

How Did You Get This To Happen? (Steps to Reproduce)

  1. Install resharper package (eg. EAP1). This will pull down resharper-platform package too.
  2. Upgrade to newer resharper-platform package (eg. EAP2)

Output Log

https://gist.github.com/flcdrg/ff81d6a8f9846f7b1a346f9b72f04162

flcdrg commented 7 years ago

The title is a bit of a tongue twister 😃

ferventcoder commented 7 years ago

It depends on how those dependencies are defined.

flcdrg commented 7 years ago

Just double checked and:

resharper-platform has no dependencies

That all looks reasonable to me

ferventcoder commented 7 years ago

This is possibly expected - https://chocolatey.org/packages/resharper has an exact version dependency so the graph is looking for a version of resharper (and others) that meet the dependency needs, thus causing the upgrades.

Outside of Chocolatey, when you upgrade ReSharper, should the platform be upgraded? And vice versa?

ferventcoder commented 7 years ago

It does sound like the order is backwards though for the upgrade

flcdrg commented 7 years ago

So 'resharper-platform' is just a way for them to pull down the installer .exe once, as JetBrains bundle all the products in one installer. All the other packages just contain scripts that call that .exe with specific arguments. If you didn't use Chocolatey, then you'd download the .exe and choose which products to install.

flcdrg commented 7 years ago

Yeah, the order is funny. The problem seems to be that the download doesn't actually happen until all the top-level package installers have run (and failed because the .exe isn't there yet)

flcdrg commented 7 years ago

There's also issues with the JetBrains packages not actually properly upgrading the installed software, but I think that's unrelated. I'll chase up JetBrains on that one.

ferventcoder commented 7 years ago

Probably need to research this one a bit more - it's definitely not the way it should work.