-
Notifications
You must be signed in to change notification settings - Fork 904
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
Upgrade all with remembered arguments changes packages to pre-release #2111
Comments
@berknam This is really helpful, thank you. Note the remembered arguments is where we believe this is occurring. It appears it adds a --prerelease flag that was remembered from alacritty.portable and continues to apply it to future items - https://gist.github.com/berknam/eed7ff55bc414d5bd2ae8a2354e99a95#file-gistfile1-txt-L1565 One way to fix this for now is to turn off useRememberedArguments. I noticed a couple of things in the log that were troubling, like the remembered args adding |
Why should it output 'fzf'? It is already on the latest version. About those '--prerelease' flags, I can't be sure now but I'm pretty sure I didn't install I have installed some prerelease packages before that I later uninstalled. I also remember that the last time this happened one of the packages that had an update available was 'neovim' that I had actually installed with the Is it possible that 'alacritty.portable' and 'cmake.install' were also updated that time to prerelease ("borrowing" the prerelease from neovim) and because I didn't notice and didn't reinstall those packages they kept that wrong remembered argument? I've also looked into the folder 'Chocolatey\.chocolatey\' and I've noticed there are some folders for prerelease versions of some of these packages including:
Here is the list of this directory: .chocolatey folder
❯ dir | Get-ItemPropertyValue -Name Name
Mode LastWriteTime Length Name d---- 29/07/2016 19:00 7zip.install.16.02 It seems to me that some packages when they are updated using Is it possible to decode the
(here the 'latest version' is the version of the folder with the latest modified date, excluding the folders of the new versions I installed today) This is just a theory, I didn't look into the code. I'm just trying to give more info here in case it helps... |
Yes, very likely. And depending on what version of choco you've had in the past. It's really hard to get to the bottom of the remembered args issues due to the timing of when things are saved versus when the issues crop up (as you can see here - #797 has some links to issues surrounding that).
Nevermind, I was thinking of something else and thought it should show up, ignore that one. :D
There is something to decode the files that a community member created. I think you'll find a link to it in the #797 ticket. |
So I was able to decode the files and since there didn't seem to be any sensible date here is the list: List of .arguments
7zip.install.16.4.0.20170403: --cache-location="'C:\Users\Alexandre Silva\AppData\Local\Temp\chocolatey'" The most important thing that I noticed is that there are a lot o package versions that have the following argument:
That argument is added by default by the Vim package and should only be on that package, but if you look it is almost everywhere! There is also the The If you want me to do something else that might help you troubleshoot this while I have chocolatey in this state please tell me. If not, I will have a look to see if there is any flag that is not by default but added by me. If there is no flag that was added by me and they are all default flags is it safe to delete all the folders inside |
This seems similar to #1443. Maybe I've had these arguments changed in previous versions of chocolatey. But there is at least a case that I'm sure happened recently which is the 'vscode.portable' that I force installed on version 1.46.0 and that made it have the correct arguments (only |
I would not delete all the folders, but if you want to delete the .arguments files, that would be fine. |
I believe have a reproduction of this issue that works in the test environment. Steps:
It has been working for me consistently. |
Always deep copy the config when making a backup originalConfig. This ensures that when the config is reset it gets fully reset. Fixes issues with reuse of arguments when useRememberedArgumentsForUpgrades is enabled. Also should fix chocolatey#1443, not just chocolatey#2111
Always deep copy the config when making a backup originalConfig. This ensures that when the config is reset it gets fully reset. Fixes issues with reuse of arguments when useRememberedArgumentsForUpgrades is enabled. Also should fix chocolatey#1443, not just chocolatey#2111
Always deep copy the config when making a backup originalConfig. This ensures that when the config is reset it gets fully reset. Fixes issues with reuse of arguments when useRememberedArgumentsForUpgrades is enabled. Also should fix chocolatey#1443, not just chocolatey#2111
…GH2112 * 'GH2112' of https://github.com/steviecoaster/choco: (chocolatey#2112) Add msp support to Install helper (maint) Switch to using a Regex match (maint) Change formatting (maint) Remove use of PowerShell aliases (maint) Replace " with ' (chocolatey#2044) Fix for changing $env:Temp (chocolatey#2259) Switched to versioned NuGet.Core (chocolatey#2111) Deep copy config (chocolatey#2244) Add Mac build into main workflow (chocolatey#2238) Mono build don't hardcode xbuild path (maint) Fix artifact paths on AppVeyor (chocolatey#2244) Fix syntax for running on Windows (chocolatey#2244) Initial workflow for Windows and Ubuntu (doc) Remove Mono instructions for other distributions (doc) Add Ubuntu 20.04 mono install instructions (chocolatey#2227) Bump Mono version in Dockerfile and README (chocolatey#2236) Mono test work with merged usr systems (chocolatey#2190) Clarify help for SpecificFolder parameter (chocolatey#1962) Use different message on error (chocolatey#1861) Improves terminology in help documentation (chocolatey#1998) Add authorization header to Get-WebFile (maint) Repalce RawGit with raw.githack.com CDN (chocolatey#1899) Remove unused variables (chocolateyGH-1060) Add BeforeInstall parameter to Install-ChocolateyPackage.ps1 (maint) Improve log message (chocolateyGH-2092) Take all registry keys into account (chocolateyGH-1364) Template create .nuspec encoded without BOM (chocolatey#1866) Limit pending package removal to top level (chocolateyGH-2203) Get-ChocolateyUnzip add unzipLocation alias (chocolateyGH-1889) Fix: Removal of ApiKey broken (chocolatey#2114) Remove unused variable (chocolateyGH-2048) update deprecation note to outdated (maint) Spelling and grammar fixes (maint) Replace tabs with spaces (chocolatey#2078) Skip importing Chocolatey GUI Extension (chocolatey#2227) Use latest Mono and Ubuntu on Travis (chocolatey#2205) Remove mention of private repository (chocolatey#2205) Update remaining URLs to new location (maint) Remove unnecessary whitespace (chocolatey#2231) Change default repository URL (maint) Remove unnecessary whitespace (chocolatey#2205) Update all chocolatey.org/docs URLs (maint) Remove unnecessary whitespace (chocolatey#2205) Update automatic-packages docs links (doc) Update to prefer # rather than GH- (maint) Fix replacement (maint) Revert change to earlier commit (maint) Fix spelling mistake (maint) Fix spelling mistake (doc) Update script to Statiq format (maint) Add missing backtick in example (maint) Added explicit link to new function name (maint) Fix spelling mistake (maint) Fix spelling mistake (maint) Fix spelling mistake (maint) Fix spelling mistake (maint) Fix spelling mistake (maint) Fix spelling mistake (maint) Remove generated docs files (maint) Add docs/generated folder to ignore list (chocolateyGH-2105) Update link to Chocolatey workshop
What You Are Seeing?
When I do
choco update all
sometimes it tries to update all my packages to pre-releases if available, even though I haven't installed those packages with the--pre
flag.What is Expected?
Only the packages installed with the
--pre
flag should update to a pre-release when runningchoco update all
.How Did You Get This To Happen? (Steps to Reproduce)
When I do
choco outdated
I get the following'choco oudated' result
Notice that it says 'dart-sdk' can be updated to version 2.9.2 which is correct because i've got version 2.9.1 installed that i've previously installed without using the
--pre
flag and have since been updating it when there are updates. But after I didcup all --noop
I get the following:'cup all --noop' result
It is trying to update all the packages as if I had ran it with
--pre
flag.I tried updating just a few packages with
cup alacritty.portable cmake.install dart-sdk
and got this:'cup alacritty.portable cmake.install dart-sdk' result
It did update 'dart-sdk' to a pre-release. This isn't the first time this happens to me, that's why I first ran the
cup all --noop
command with the--noop
flag because I no longer trust that command to behave correctly. After this I uninstalled the 'dart-sdk' package withchoco uninstall dart-sdk
and after uninstalling that package runningcup all --noop
I now get the following (no longer tries to update to prereleases):'cup all --noop' result
I've previously had this happening and only noticed after updating the packages. I noticed I had python 3.9.0 for example which was in beta still. After uninstalling all the packages that had been updated to the pre-release versions and then installing them again the
cup all
command started to behave normally again. So I dismissed it then but started running the command with the--noop
flag first. Now this happened again so I decided to open this issue. I really would like to use that command without having to check first if it will behave correctly or not.After this I tried updating python3 and it did update correctly (it didn't update to a pre-release version).
Output Log
https://gist.github.com/berknam/eed7ff55bc414d5bd2ae8a2354e99a95
The text was updated successfully, but these errors were encountered: