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

When selecting not to install an update, chocolatey asks for a rollback #188

Closed
christianrondeau opened this issue Mar 20, 2015 · 5 comments

Comments

@christianrondeau
Copy link
Contributor

If I decide not to continue with the uninstall by refusing to run the script, I'm expecting not to receive a request to rollback. Here is an example:

Do you want to run the script?
 NOTE: If you choose not to run the script, the installation will
 fail.
 Skip is an advanced option and most likely will never be wanted.

 1) yes
 2) no [Default - Press Enter]
 3) skip
no
filezilla upgrade not successful.
User cancelled powershell portion of installation for 'C:\ProgramData\chocolatey\lib\filezilla\tools\chocolateyInstall.ps1'.
 Use skip to install without run.
 Unsuccessful operation for filezilla.
  Do you want to rollback to previous version (package files only)?
 1) yes [Default - Press Enter]
 2) no
no

Note that the rollback message itself could also be improved :)

For more details: https://groups.google.com/forum/#!topic/chocolatey/UVncL7PxXRg

(Moved from chocolatey-archive/chocolatey#696)

@rismoney
Copy link
Contributor

if you control-c at the menu, it has already downloaded the spec, and created the dir in /lib so it thinks that the package is installed on a subsequent rerun.

@christianrondeau
Copy link
Contributor Author

In the example outlined in the original post, there was no ctrl + c but I guess it could lead to the same result. A potential "simple" solution (just throwing ideas) would be to flag a package as "not successfully installed" until it has ben installed completely, so that after the operation has completed unsuccessfully, the package is simply removed. If what you just said is true (I don't actually know :))

@DarwinJS
Copy link
Contributor

As an implementation detail I would suggest having flag files in the package folder rather than using the folder as a marker. This would allow chocolatey to sense that there have been failed installs and clean them up or even show alerts in some type of audit mode or in "choco list -lo"

Options for install status could be "user aborted", "incomplete", "error".

Could start the install with "installstatus.incomplete" and at the end change to "installstatus.installed" If other handled conditions arise, leave off with that status "installstatus.userabort". In the case of "installstatus.error" - maybe the file could contain the error text. Then it could be programmatically retreived or viewed by the automation engineer directly.

Just ideas - I'm sure you guys will figure out a great way to handle it.
D.

@ferventcoder
Copy link
Member

A user cancelled script will auto rollback - #985

@ferventcoder
Copy link
Member

Forgot this was here when I put in the work for the 0.10.2 release

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

4 participants