-
Notifications
You must be signed in to change notification settings - Fork 905
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
Hold pending check for 10 seconds / provide means of explicitly overriding the transactional install cleanup #822
Comments
Related to #198. |
This is an interesting side effect of ensuring a pending install. The way to handle this is to delete the |
Right now the answer is to delete the
Interesting
This could be confusing in what commands would trigger the pending cleanup
This could be the best option. This is quite an interesting way of going about it. Another option is to look at the timestamp for that |
The workaround works for now. However, just for anyone needing this in the meantime: The filename is |
After thinking about this some more, 2 minutes is way too long. 20 seconds is more reasonable be default. I think we will also allow you to drop a file to skip pending. Does that seem reasonable? |
FYI, one of the things we are moving towards is only allowing one choco process at a time. |
Include an empty |
This will be released in 0.9.10.3 |
When a pending file is created, it needs to be at least 10 seconds old before choco will automatically remove the unfinished pacakge. This allows running choco functions inside of a package (as long as they are done quickly). If someone needs to override the functionality of the removal of a package due to the pending file, choco will also look for a .chocolateyPendingSkip and skip the removal if that file is found.
* stable: (GH-826) SYSTEM user always uses machine TEMP (GH-808) Allow silent args as array (GH-821) ValidExitCodes not recognized return 0 (GH-818) Allow disk to catch up - sleep (GH-822) Provide pending override and file wait (GH-818) Wait for processes to exit + 2 seconds (maint) formatting (GH-819) Fix - NotSilent install failure binding (GH-775) remove 7za (GH-775) Use 7z instead of 7za
From the command line, is it possible to start multiple chocolatey install scripts without interfering with each other? The current default of nuking the in-progress install seems unreasonable. Either:
"Pending" installs and their removal isn't as clean as it may seem at first glance, since choco has no idea what artifacts the package has already inserted into the system, and unceremoniously removing the package does not even allow the user the ability to run the package's uninstall script to try and clean up. In most cases it just ends up irrevocably borking the package on that system. |
@masaeedu can you give me a really good use case for running choco in parallel? |
What you are stating here would probably be best as a new "Improve pending operations" enhancement ticket. |
A product is being installed via chocolatey. I open a terminal and try to check what packages are installed:
This dumps the existing install, but not before it has proceeded far enough that reattempts to install the package fail. I cannot uninstall because the package is not installed. I cannot force install because that doesn't work. I must know what the package does to the system and undo it manually, or dump and rebuild the system. Substitute listing packages with trying to install process explorer, checking the version of a package, enabling a chocolatey feature etc. etc. etc. |
I can see other things that maybe should not trigger pending checks, but other installs would. Again, Please create a new ticket with the title "Improve Package Pending Operations" - perhaps one thing we can do is put a process lock on the file and if a lock is found, we simply skip that pending operation. |
Original title: no longer able to run choco commands from chocolateyInstall.ps1
Since 0.9.10, with the cleanup of unfinished packages, it is no longer possible to run choco commands from inside a chocolateyInstall.ps1
Our rationale for that is that we have a kickstarter package, which resides on an uprotected feed. This package asks for username and password and configures the chocolatey sources to point to our feed aggregator (nexus), using the user credentials.
This stopped working with 0.9.10, since any run of the choco command seems to clean the currently installing package from the lib folder, resulting in an unsuccessful installation.
In order to fix this, we would either need to:
The text was updated successfully, but these errors were encountered: