-
Notifications
You must be signed in to change notification settings - Fork 908
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
Chocolatey forgets packages where CTRL+C was pressed during upgrade #1548
Comments
There definitely seems to be a problem with ..\chocolatey\lib\packagename being removed on aborted installs and thus the package becomes lost/forgotten. I've been experiencing this for the last 2-3 builds. It's not just a CTRL+C thing, it can be an upgrade failed because the system needed a reboot first, etc. etc. Seems to be an issue of just putting the original (old) package files back when an upgrade fails. I recently mentioned it here: https://groups.google.com/forum/#!topic/chocolatey/zsMuLUSzSwE and about four months ago here: https://chocolatey.org/packages/choco-persistent-packages#comment-3692438597 Glad it's not just me! :) Glad/Sad this isn't just a Pro thing - it'll get fixed faster! :) Let me know if I can provide any info. |
@dinfinity unfortunately that is why Control+C is definitely not recommended. It can cause issue like this. |
So this seems to affect dependencies more than it does anything else. I can see that in the source code. |
@ferventcoder: Well, what am I supposed to do if I see Chocolatey installing Ruby into my PHP directory? Is there a proper abort keystroke I can use? |
* stable: (version) 0.10.11 (doc) update release notes for 0.10.11 (GH-1540) Fix - AutoUninstaller can't find escaped quotes (GH-1543) Fix - log format error on install location with GUID (GH-1500) Fix - Wrap Write-Host if used in setup (GH-991) Install - Modify profile if file exists & empty (GH-1443) Set original config before loop (maint) add a note for GH-1548 (GH-1557) Upgrade 7z to 18.5
@dinfinity you can control-c and then check to see if you have missing package files, or better yet let it finish installing, then uninstall, then install again with using the parameters to install to the location of your choice. |
This is still a problem (0.10.11). It is a pain in the ass. Due to other chocolatey bugs ( #797 (comment) ) I sometimes need to abort during a choco upgrade all, to prevent all kinds of upgrades to be installed into the same target directory. An upgrade should be transactional and not forget which packages I want on my system. That is pretty much the opposite of what a package manager should be doing. |
This problem is NOT just related to dependencies, this is related to any package that is aborted during its upgrade process. After moving the old package files to chocolatey\lib-bkp and the upgrade "abortion," the original package files never get put back to chocolatey\lib and Chocolatey then looses all management of the package. I'm not positive, but I think this can be fixed via the Chocolatey PS helper files. I've added some references other people have suggested for handling cntrl-c and clean up based on it in #619. HTH. This is easily reproducible by newly installing an old version of any package with embedded binaries followed by an upgrade which is aborted. Do a choco list -l and no version of the package will be known to choco as installed. The exception to this, of course, is licensed Chocolatey users with Package Synchronizer which will re-find the program and add the package files. Chocolatey FOSS users don't have Package Synchronizer and the management of the package by Chocolatey will be lost. So this must be tested via the FOSS version of Chocolatey. |
What You Are Seeing?
Because #1443 is still not fixed, I sometimes need to CTRL+C during choco upgrade all, because chocolatey wants to install a package into the wrong directory. I just noticed that after I do that, Chocolatey forgets that I had the package installed.
What is Expected?
That after aborting an upgrade of a package, the next run of choco upgrade tries to upgrade it again instead of forgetting about the package.
How Did You Get This To Happen? (Steps to Reproduce)
See #1443 and above.
Output Log
Ruby upgrade aborted with CTRL+C to prevent installation to C:\Frameworks\PHP:
Note #1443 here: 2018-04-22 13:57:43,185 11748 [DEBUG] - Running Start-ChocolateyProcessAsAdmin -validExitCodes '0' -workingDirectory 'C:\ProgramData\chocolatey\lib\ruby\tools' -statements '/verysilent /dir="C:\Frameworks\PHP" /tasks="assocfiles,noridkinstall,modpath" INSTALLDIR=C:\Frameworks\NodeJS' -exeToRun 'C:\ProgramData\chocolatey\lib\ruby\tools\rubyinstaller-devkit-2.5.1-1-x64_x64.exe'
Accompanying cmd output:
Note the lack of ruby between rsync and sandboxie and the line "Removing incomplete install for 'ruby'"
The text was updated successfully, but these errors were encountered: