Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Chocolatey as a dependency should be handled specially #951

Open
jberezanski opened this issue Sep 7, 2016 · 3 comments
Open

Comments

@jberezanski
Copy link

If a package depends on certain Chocolatey features in its scripts, it is intuitive for the package autor to specify a dependency on a minimum version of Chocolatey that contains these features.
This, however, will not work as expected in all cases (and may even introduce weird issues), because only the PowerShell part of Chocolatey (the helper functions) is currently reimported during Chocolatey upgrade.
(see this comment; also this issue - it was much easier to handle when all of Chocolatey was implemented in PowerShell)

I believe the upgrade of Chocolatey should be handled as a special case:

  1. before installing anything, check if the graph of packages to be installed/upgraded contains Chocolatey,
    2a) in chocolatey.dll, signal it to the hosting application, e.g. by throwing a documented exception (it is the responsibility of the hosting application to upgrade itself) and stop the installation,
    2b) in choco.exe, upgrade Chocolatey first (before any other package), then continue the installation by starting the upgraded choco.exe, passing all arguments from the original invocation of choco.exe.
@ferventcoder ferventcoder added this to the 0.10.x milestone Sep 7, 2016
@ferventcoder
Copy link
Member

This would be interesting to accomplish...

@flcdrg
Copy link
Member

flcdrg commented Feb 6, 2018

I think upgrading chocolatey.extension should be in the same boat

@ferventcoder
Copy link
Member

Agreed. There was a locking issue we overcame recently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants