[BUG] Chocolatey install command (not update command) uses an older cached installer even when upgrading #522
Comments
Perhaps. This should only leave the installer alone if it finds the checksum to be the same, but it could be I introduced something else into the mix fixing what was thought to be an issue. |
Adding checksums to your package would also be helpful. |
When you say you cleaned up all the files, do you mean you deleted the %TEMP% files? |
It's not my package yet, but I'm looking to take it over, which is why I am testing :) I updated the "cleaned up" statement in the description above. I'm trying to say that I was being thorough. I reverted to a 1.11-only state: Chocolatey lib, Control Panel, %TEMP%... all 1.11. No trace of 1.12. |
What is wonky then? |
The choco install command for a newer package is using the cached installer for the old package. Sorry, was that not clear? I could test the same scenario with specific older versions of an existing, public package to remove any local source variability (though, I don't suspect that's part of the problem). |
Definitely not clear as you said it worked in the end with a file in the temp folder (as I was attempting to clear that up). So did it work in the end or did it fail? |
Chocolatey What's the intended behavior of |
Now I understand. Yes, big bug. |
I think I understand what might be causing this - are pandoc 1.11 and 1.12 installer files the exact same size (get-contentlength)? |
Not even close, 1.11 is about 5,664 KB and 1.12 is about 11,644 KB. |
super big bug then :( |
Help me out here - I'm trying to reproduce - https://gist.github.com/ferventcoder/d928b61f69d65ac7bd4e |
Going to have to close this as not reproducible unless we get to the bottom of this. I'll need full debug output to understand what is wrong. |
I'll try to repro it with a published package. But, you should still try it with a local package... I can send you my local pandoc 1.12 package for exact repro. |
That would be super helpful. |
I tried this with a local package and it appears to work just fine.
|
Could this just be a misunderstanding of -force? If you have a package in chocolateyinstall + lib, force doesn't remove what is already there (yet). |
Closing as non-repro |
I have pandoc 1.11 installed and I'm developing/testing an update to 1.12. But you can see that it's not downloading the new installer at all (related to #428).
The only installer in
%TEMP%
is the old 1.11. The installed version reported in Control Panel is still 1.11. But, Chocolatey thinks 1.12 is installed.I'm definitely using the latest, local package. The contents of the install scripts are
So,
install
is using the old package's cached installer even though it finds a newer package. That's bad, right? A fix might start by including the version in the %TEMP% directory's name.FYI, I cleaned up all my 1.12 files/state, got back to just 1.11, and tried
update
and it did work:The text was updated successfully, but these errors were encountered: