chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.65k stars 250 forks source link

Add support for uninstalling metapackages #731

Open Arcitec opened 4 years ago

Arcitec commented 4 years ago

I used the GUI (0.17.0.0) to uninstall cmake, which is a metapackage for cmake.install. This was the console log:

Uninstalling package
Uninstalling the following packages:
cmake
You are uninstalling cmake, which is likely a metapackage for an 
 *.install/*.portable package that it installed 
 (cmake represents discoverability).
For the question below, you have 20 seconds to make a selection.
Would you like to uninstall cmake.install as well?
 1) yes
 2) no

Then it sat there for 20 seconds until it said Timeout or your choice of '' is not a valid selection. and just uninstalled cmake.

Support can be done in two ways:

  1. Ask the user via a messagebox if they wanna uninstall the other package too. With the same timeout as the console app and auto-defaulting to No.

  2. Or, always auto-answer No so that the uninstall happens instantly...

Arcitec commented 4 years ago

The weirdest thing is that it seems to have uninstalled cmake.install too, by default. When the timeout happened, I no longer see cmake.install either. I guess chocolatey's own default behavior is Yes...

Arcitec commented 4 years ago

Just uninstalled NodeJS which is a metapackage for NodeJS.Install. Same thing happened. But this one did not uninstall the NodeJS.install package. So the default choice is package-dependent or perhaps implemented (choco uninstall cmake.install) in the uninstall script of the cmake metapackage I guess.