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

Can the newer version be downloaded first before uninstalling older during upgrading? #1973

Open
bpmf opened this issue Dec 25, 2019 · 2 comments

Comments

@bpmf
Copy link

bpmf commented Dec 25, 2019

Tried to upgrade a package using cup command, it first deleted the one version then started downloading. Since the network is very slow then, and I cancelled via Ctrl-C. However, due to the old version was uninstalled in half, it cannot be used any more!

Is there a switch or configuration which can make choco download first and then start uninstall when the package is downloaded and fully ready, or some feature that can recover old version when upgrading failed?

@nutterthanos
Copy link

nutterthanos commented Dec 30, 2019

Like apt download (package to download) then apt remove (package to remove) then apt install (package to install) except something like this does not exit that im a aware of. and about half installed package i would think something like apt install (broken package) --reinstall but would need a implementation for chocolatey.

@ferventcoder
Copy link
Member

Tried to upgrade a package using cup command, it first deleted the one version then started downloading.

First some terminology - "package" is Chocolatey package, aka nupkg file format.

Chocolatey does not delete the current Chocolatey package that is installed before downloading the new version. It takes a backup first, but leaves everything intact in the package installation directory until it's ready to upgrade. Please read over https://chocolatey.org/docs/getting-started#how-does-chocolatey-work.

Now, what you are likely referring to is the software download that happens once the upgraded package is in place - this is a special concern of the community repository as it is working within the constraints of distribution rights - packages in places that are not public would have the binaries (software, software installers, etc) in the Chocolatey package itself. However the community repository is public and that gets into copyright laws and redistribution rights.

So when it is stated that Chocolatey should behave in the same way as apt - it does with regard to the Chocolatey package, however there may be things external to the package that must be downloaded in scenarios like the above.

I'll need you to think about what was stated here and be more specific about what you mean, because most packages will not uninstall the software on the machine until the new one is all ready to go. However there might be a package you are using that is maybe not the best behaved and should be corrected there. But until we understand a bit more about what you mean, it's going to be hard to guide the right way. If you can provide a verbose debug log, that would be helpful for us to investigate what you mean a bit more and let you know which way this should go. HTH

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