chocolatey / cChoco

Community resource to manage Chocolatey
Apache License 2.0
153 stars 99 forks source link

Forcing new version with cChocoPackageInstaller with meta-package doesn't uninstall cleanly #91

Open flcdrg opened 7 years ago

flcdrg commented 7 years ago

Given a machine that had successfully ran:

  cChocoPackageInstaller node {
    Name = "nodejs"
    Version = "8.1.0"
    DependsOn = @("[cChocoInstaller]Chocolatey")
  } 

Then if that is updated to

  cChocoPackageInstaller node {
    Name = "nodejs"
    Version = "8.2.1"
    DependsOn = @("[cChocoInstaller]Chocolatey")
  }

Then the old version is uninstalled and it appears to fail to handle the nodejs/nodejs.install combination (it prompts whether to uinstall nodejs.install but immediately continues assuming no response).

Here is the relevant extract from chocolatey.log

2017-07-24 23:30:32,447 5732 [INFO ] - Chocolatey v0.10.7 2017-07-24 23:30:32,824 5732 [INFO ] - Uninstalling the following packages: 2017-07-24 23:30:32,826 5732 [INFO ] - nodejs 2017-07-24 23:30:33,465 5732 [WARN ] - You are uninstalling nodejs, which is likely a metapackage for an .install/.portable package that it installed (nodejs represents discoverability). 2017-07-24 23:30:33,490 5732 [INFO ] - For the question below, you have 20 seconds to make a selection. 2017-07-24 23:30:33,491 5732 [INFO ] - Would you like to uninstall nodejs.install as well? 2017-07-24 23:30:33,491 5732 [INFO ] - 1) yes 2017-07-24 23:30:33,492 5732 [INFO ] - 2) no 2017-07-24 23:30:53,502 5732 [ERROR] - Timeout or your choice of '' is not a valid selection. 2017-07-24 23:30:57,561 5732 [INFO ] - [NuGet] Uninstalling 'nodejs 8.1.4'. 2017-07-24 23:30:57,568 5732 [INFO ] - nodejs v8.1.4 2017-07-24 23:30:57,598 5732 [INFO ] - Skipping auto uninstaller - No registry snapshot. 2017-07-24 23:30:57,707 5732 [INFO ] - [NuGet] Successfully uninstalled 'nodejs 8.1.4'. 2017-07-24 23:30:57,736 5732 [INFO ] - nodejs has been successfully uninstalled. 2017-07-24 23:30:57,795 5732 [WARN ] - Chocolatey uninstalled 1/2 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Everything ends up ok eventually as when the new version is installed then that results with nodejs and nodejs.install both being at 8.2.1

ferventcoder commented 7 years ago

This looks more like it is a choco issue than it is a cChoco issue. Perhaps file a request over there. No response should not be an error

ferventcoder commented 7 years ago

@flcdrg would you mind filing an issue over there and linking back to this issue? Thanks!