-
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
Uninstall throws error on path not found if the id nuspec file in lib folder and inside downloaded nupkg is different case #1040
Comments
added this to next release. |
I ran this with the latest beta and was not able to get it to occur. I am going to move this to next release and mark it back for triage. |
@ferventcoder I don't suppose it would be possible to provide a beta release of choco? |
@AdmiringWorm there is a beta out now. However it is incompatible with the licensed edition. Something to keep in mind. Working on a fix for the incompatibility and will provide notice to all customers related to that. |
I just tried with the latest available beta, and it is still happening for me. |
I can't seem to replicate the issue when debugging through visual studio though. |
i just ran into this issue with v0.10.5 (latest currently)
the error on uninstall:
|
@ferventcoder have there been any update on this on what is causing this error? |
@johnypony3 Can you post a gist of your full log output (you can find it in the chocolatey.log file or one of the numbered files)? Since this is quite difficult to recreate, it would be helpful. @AdmiringWorm did you happen to notice this right before the error from your gist? If the folder it is looking for the package in has changed to something like the above, that explains why it would not find the package. |
@ferventcoder that certainly is odd (IMO). Unless choco changed the folder, the folder shouldn't have changed. |
oh geez :) i thought this was related to the paket package, i'm unable to help with this today
|
I've seen this happen for a package that was originally created on Chocolatey.org with the id 'SqlToolbelt'. When I took over maintaining the package, I wrote my own nuspec with 'sqltoolbelt'. This caused uninstall fails like this - https://gist.github.com/choco-bot/711c5e276e9293c9069af01e916ccb86 Updating my nuspec to revert to the original casing caused the uninstall to pass - https://gist.github.com/choco-bot/9cac09aaaf23d8f649f7034398b0cea7) |
I just ran into this bug yesterday with Chocolatey v0.10.7 Professional. An easy way to duplicate this problem is with the current GNU Wget 1.19.1 package since it's small and fast to install/uninstall. |
Starting to wonder if this is in the nuget.core codebase instead. |
I think the trick here is to start by installing a package with one case, then change case of the package and have an upgrade of that. Then upgrade. Then attempt uninstall. |
When uninstalling packages, attempt to use lower case as the local file system could be having issues finding the package. Log more surrounding what is going on to try to pinpoint the source of the issue. Also skip removing files if they are already deleted.
* stable: (version) 0.10.9-beta (GH-1400) API - Ensure one instance of GetChocolatey (GH-1399) uninstall - keep stored pkg information (maint) formatting/wording (GH-1398) Upgrade: Ignore unfound option (GH-1398) Use feature for ignore unfound pkgs (GH-1398) fix: specs (GH-1040) use lower case for uninstall / log more (GH-1398) outdated: ignore unfound
What You Are Seeing?
When uninstalling a package where the id in
lib\packageName.nuspec
and the nuspec file insidelib\packageName.nupkg
have different casing, the uninstallation process throws an errorreporting that the
lib\PackageName
path was not found.It does not matter if the uninstall script is run, or if it is skipped.
What is Expected?
No error even if the casing is different
How Did You Get This To Happen? (Steps to Reproduce)
I'll give an example with the InnoSetup package.
The casing on the website uses upper case I and S, while when I pushed
the package with all lowercase.
When that package is then installed, the casing of the id element in the nuspec file inside the downloaded nupkg file and the nuspec file in the lib folder are different causing the error of a path not found.
Output Log
https://gist.github.com/AdmiringWorm/bac515b64b3d4e22f5eba385b07efb5c
Tested with choco versions
choco 0.10.3 (Error occurred)
choco 0.10.2 (Error occurred)
choco 0.10.1 (No Error)
The text was updated successfully, but these errors were encountered: