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

(wget) uninstalls with false error but finishes correctly #1094

Closed
bcurran3 opened this issue Aug 15, 2018 · 4 comments
Closed

(wget) uninstalls with false error but finishes correctly #1094

bcurran3 opened this issue Aug 15, 2018 · 4 comments

Comments

@bcurran3
Copy link
Contributor

bcurran3 commented Aug 15, 2018

https://chocolatey.org/packages/Wget

C:\ProgramData\chocolatey\lib>cinst wget
Chocolatey v0.10.11
Installing the following packages:
wget
By installing you accept licenses for the packages.
Progress: Downloading Wget 1.19.4... 100%

Wget v1.19.4 [Approved]
wget package files install completed. Performing other installation steps.
Getting x64 bit zip
Extracting C:\ProgramData\chocolatey\lib\Wget\tools\wget-1.19.4-win64_x64.zip to C:\ProgramData\chocolatey\lib\Wget\tools...
C:\ProgramData\chocolatey\lib\Wget\tools
ShimGen has successfully created a shim for wget.exe
The install of wget was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\Wget\tools'

Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

C:\ProgramData\chocolatey\lib>choco uninstall wget
Chocolatey v0.10.11
Uninstalling the following packages:
wget

wget v1.19.4
Skipping auto uninstaller - No registry snapshot.
wget has been successfully uninstalled.
wget not uninstalled. An error occurred during uninstall:
Unable to find package 'wget'.

Chocolatey uninstalled 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • wget (exited 1) - wget not uninstalled. An error occurred during uninstall:
    Unable to find package 'wget'.

If a package uninstall is failing and/or you've already uninstalled the
software outside of Chocolatey, you can attempt to run the command
with -n to skip running a chocolateyUninstall script, additionally
adding --skip-autouninstaller to skip an attempt to automatically
remove system-installed software. This will only remove the packaging
files and not things like software installed to Programs and Features.

If a package is failing because it is a dependency of another package
or packages, then you may first need to consider if it needs removed
as it is typically installed as a dependency for a reason. If you
decide that you still want to remove it, head into
$env:ChocolateyInstall\lib and find the package folder you want
removed. Then delete the folder for the package. This option should
only be used as a last resort.

It DOES uninstall though.

I've looked through the package files and they appear to be fine. I BELIEVE this problem actually lies in the chocolatey.org database with the name and needs to be changed from "Wget" to "wget" to be resolved. Seems more aprapos to open issue here instead of at chocolatey.org.

Expected Behavior

Not to see...

wget not uninstalled. An error occurred during uninstall:
Unable to find package 'wget'.

Chocolatey uninstalled 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • wget (exited 1) - wget not uninstalled. An error occurred during uninstall:
    Unable to find package 'wget'.

If a package uninstall is failing and/or you've already uninstalled the
software outside of Chocolatey, you can attempt to run the command
with -n to skip running a chocolateyUninstall script, additionally
adding --skip-autouninstaller to skip an attempt to automatically
remove system-installed software. This will only remove the packaging
files and not things like software installed to Programs and Features.

If a package is failing because it is a dependency of another package
or packages, then you may first need to consider if it needs removed
as it is typically installed as a dependency for a reason. If you
decide that you still want to remove it, head into
$env:ChocolateyInstall\lib and find the package folder you want
removed. Then delete the folder for the package. This option should
only be used as a last resort.

... after " wget has been successfully uninstalled."

Current Behavior

s/a

Possible Solution

s/a

Steps to Reproduce (for bugs)

Install and then uninstall the wget package.

Context

Your Environment

  • Package Version used: v1.19.4 but this is a long standing problem.
  • Operating System and version: Win 10
  • Chocolatey version: Chocolatey v0.10.11
  • Install/uninstall gist: n/a
@majkinetor
Copy link
Contributor

It looks like upstream bug, the package doesn't have uninstaller. Also, everything looks OK. Here is the last part of verbose debug:


[NuGet] Successfully uninstalled 'wget 1.19.4'.
 wget has been successfully uninstalled.
Removing nupkg if it still exists.
Ensuring removal of installation files.
 Found 'C:\ProgramData\chocolatey\lib\wget\tools\COPYING'
  with checksum 'C678957B0C8E964AA6C70FD77641A71E'
Attempting to delete file "C:\ProgramData\chocolatey\lib\wget\tools\COPYING".
 Found 'C:\ProgramData\chocolatey\lib\wget\tools\wget.exe'
  with checksum 'D9EAB04C36651BC9E00133DADE688924'
Attempting to delete file "C:\ProgramData\chocolatey\lib\wget\tools\wget.exe".
 Found 'C:\ProgramData\chocolatey\lib\wget\tools\wget.exe.gdb'
  with checksum '2A1BB9D4026B84C722589BD2B87F3B20'
Attempting to delete file "C:\ProgramData\chocolatey\lib\wget\tools\wget.exe.gdb".
 Found 'C:\ProgramData\chocolatey\lib\wget\tools\wget.html'
  with checksum '7FACD5C6E85F20562A9F015E216EEE46'
Attempting to delete file "C:\ProgramData\chocolatey\lib\wget\tools\wget.html".
Attempting to delete directory "C:\ProgramData\chocolatey\lib\wget".
Ensuring removal of package cache files.
wget not uninstalled. An error occurred during uninstall:
 Unable to find package 'wget'.

/cc @gep13

@majkinetor majkinetor changed the title wget - uninstalls with false error (wget) uninstalls with false error but finishes correctly Aug 16, 2018
@bcurran3
Copy link
Contributor Author

bcurran3 commented Aug 16, 2018

To my knowledge, ALL packages that have an uppercase letters in them "fail" uninstall.

i.e. The problem is during the creation of the \lib\Wget folder.

I've looked through the package files and they appear to be fine. I BELIEVE this problem actually lies in the chocolatey.org database with the name and needs to be changed from "Wget" to "wget" to be resolved. Seems more aprapos to open issue here instead of at chocolatey.org.

@majkinetor
Copy link
Contributor

ALL packages that have an uppercase letters in them "fail" uninstall.

Didn't know about this. If this is the case, even more upstream issue of even bigger importance.

Seems more aprapos to open issue here instead of at chocolatey.org.

Issue is for choco.exe. I don't think we can do anything here except renaming package but there is some reason I forgot why we don't that. /cc @AdmiringWorm

@AdmiringWorm
Copy link
Member

To my knowledge, ALL packages that have an uppercase letters in them "fail" uninstall.

Only packages that originally had an uppercase, and have since been pushed with a lowercase would fail to uninstall.

Issue is for choco.exe.

Indeed it is, and an issue for it already exist: chocolatey/choco#1040

I don't think we can do anything here except renaming package but there is some reason I forgot why we don't that.

No need to rename, we just need to return the original casing of the id through PackageName in the update.ps1 file.
I've updated the update.ps1 file to return the original casing of the wget package, which should resolve this issue the next time wget is updated. (I didn't really bother adding a fix version for it, as the package should still uninstall even though it reports an error).

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

3 participants