chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.29k stars 902 forks source link

preview/beta package install after upgrade to 2.0.0 #3189

Closed theperiscope closed 1 year ago

theperiscope commented 1 year ago

Checklist

What You Are Seeing?

Preview packages got installed after issuing choco upgrade all command with chocolatey 2.0.0

What is Expected?

Preview packages should not be installed with choco upgrade all

How Did You Get This To Happen?

I have 165 packages installed, after upgrade to 2.0.0 and issuing choco upgrade all I observed that a few "preview" packages got installed. The issue has occured only on one of two computers so far. Win 10 Pro on one where issue is, Win 11 Pro on the other - nothing particularly special in setup and I pretty much never use preview/beta packages.

Installed preview packages I had to manually uninstall:

Subsequent run of choco upgrade all --noop for dart-sdk message (did not show with chocolatey 1.4.0, those are packages whose upgrade I CTRLC-C interrupted earlier):

You have dart-sdk v2.19.6 installed. Version 3.1.0.155-c-000-dev is available based on your source(s).
You have python v3.11.3 installed. Version 3.12.0-b1 is available based on your source(s).

Interestingly, after I manually uninstalled and reinstalled, for example powershell-core with --exclude-preview option the subsequent choco upgrade all does not suggest preview version.

choco sources list:

Chocolatey v2.0.0
chocolatey - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.

System Details

Installed Packages

Chocolatey v2.0.0
7zip.install 22.1.0
anki 2.1.64
bat 0.23.0
bottom 0.9.1
boxes.portable 2.2.0
caddy 2.6.4
calibre 6.19.1
carnac 2.3.13
cascadiacode 2111.1.0
cascadiacodeitalic 2111.1.0
cascadiacodepl 2111.1.0
cascadiacodepl-italic 2111.1.0
cascadiafonts 2111.1.0
cascadiamono 2111.1.0
cascadiamonoitalic 2111.1.0
cascadiamonopl 2111.1.0
cascadiamonopl-italic 2111.1.0
chocolatey 2.0.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-font-helpers.extension 0.0.4
chocolatey-visualstudio.extension 1.10.2
chocolatey-windowsupdate.extension 1.0.5
clink-maintained 1.4.21
cloudflared 2023.5.1
Cmder 1.3.21
croc 9.6.4
ctags 5.8.1
curl 8.1.2
dart-sdk 2.19.6
devtoys 1.0.12
DotNet4.5.2 4.5.2.20140902
DotNet4.6.1 4.6.1055.20170308
dotnet4.7.1 4.7.2558.20190226
dotnet4.7.2 4.7.2.20210903
dotnet-5.0-runtime 5.0.17
dotnet-5.0-sdk 5.0.408
dotnet-5.0-sdk-2xx 5.0.214
dotnet-5.0-sdk-3xx 5.0.303
dotnet-5.0-sdk-4xx 5.0.408
dotnet-7.0-desktopruntime 7.0.5
dotnet-8.0-desktopruntime 8.0.0-preview4232601
dotnetcore 3.1.32
dotnetcore-3.1-runtime 3.1.32
dotnetcore-3.1-sdk 3.1.426
dotnetcore-3.1-sdk-4xx 3.1.426
dotnetcore-runtime 3.1.32
dotnetcore-runtime.install 3.1.32
dotnetcore-sdk 3.1.426
dotnet-desktopruntime 8.0.0-preview4232601
dotnetfx 4.8.0.20220524
espanso 2.1.8
etcher 1.18.4
Everything 1.4.11024
exiftool 12.62.0
f.lux 4.120.0
f.lux.install 4.120.0
Far 3.0.6000
fd 8.7.0
Firefox 113.0.2
flameshot 12.1.0
fonts-poppins 1.1.0
foxitreader 12.1.2.15332
fsviewer 7.7.0
fzf 0.41.1
Ghostscript 10.0.0.20230317
Ghostscript.app 10.0.0.20230317
gimp 2.10.34
git 2.40.1
git.install 2.40.1
gittfs 0.32.0
go-fonts 2.8.0
golang 1.20.4
graphviz 8.0.5
hugo 0.112.5
hyperfine 1.16.0
jq 1.6.0
KB2533623 2.0.0
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3063858 1.0.0
KB3118401 1.0.5
keepassxc 2.7.5
kitty 0.76.1.12
lazygit 0.38.2
less 633.0.0
lsd 0.23.0
lua 5.1.5.52
magic-wormhole 0.12.0
magic-wormhole.portable 0.12.0
micro 2.0.11
mockoon 3.0.0
neovim 0.9.1.20230531
netfx-4.5.2-devpack 4.5.5165101.20180721
netfx-4.6.1-devpack 4.6.1055
netfx-4.7.2 4.7.2
netfx-4.7.2-devpack 4.7.2.20210903
nssm 2.24.101.20180116
NSwagStudio 13.19.0
nvm 1.1.9
nvm.install 1.1.11
nvm.portable 1.1.9
obs-studio 29.1.2
obs-studio.install 29.1.2
oh-my-posh 16.9.1
photogimp 1.0.2020
postman 10.12.0
powershell-core 7.3.4
powertoys 0.70.0
putty 0.78.0
putty.portable 0.78.0
python 3.11.3
python2 2.7.18
python3 3.11.3
python311 3.11.3
python312 3.12.0-b1
qbittorrent 4.5.3
qdir 11.26.0
rclone 1.62.2
rclone.portable 1.62.2
redis-desktop-manager 2021.5.357
ripgrep 13.0.0.20220913
sass 1.62.1
scribus 1.4.8
sd-cli 0.7.5
sdelete 2.4.0
sourcetree 3.4.9
SQLite 3.42.0
sqlitestudio 3.4.4
sqlite-studio.portable 3.4.4
sql-server-management-studio 19.0.20209
sshfs 3.5.20357
syncthing 1.23.4
tailscale 1.42.0
upx 4.0.2
vcredist140 14.36.32532
vcredist2005 8.0.50727.619501
vcredist2008 9.0.30729.616104
vcredist2010 10.0.40219.32503
vcredist2012 11.0.61031.20230518
vcredist2015 14.0.24215.20170201
vcredist2017 14.16.27033
visualstudio2019buildtools 16.11.26
visualstudio2019-workload-azurebuildtools 1.0.1
visualstudio2019-workload-databuildtools 1.0.1
visualstudio2019-workload-manageddesktopbuildtools 1.0.2
visualstudio2019-workload-netcorebuildtools 1.0.1
visualstudio2019-workload-webbuildtools 1.0.1
visualstudio-installer 2.0.3
vlc 3.0.18
vlc.install 3.0.18
vmware-workstation-player 17.0.2.21581411
vscode 1.78.2
vscode.install 1.78.2
webdeploy 3.6.20210729
winfsp 2.0.23075
wiztree 4.13.0
xsv 0.13.0
yt-dlp 2023.3.4
zig 0.10.1
zoomit 7.0.0
165 packages installed.

Output Log

You have dart-sdk v2.19.6 installed. Version 3.1.0.155-c-000-dev is available based on your source(s).
You have python v3.11.3 installed. Version 3.12.0-b1 is available based on your source(s).

Additional Context

No response

theperiscope commented 1 year ago

I just tried uninstalling, then installing and upgrading python package - notice the difference between choco upgrade all --noop and choco upgrade python --noop.

> choco uninstall python
Chocolatey v2.0.0
Uninstalling the following packages:
python

python v3.11.3
 Skipping auto uninstaller - No registry snapshot.
 python has been successfully uninstalled.

> choco install python
Chocolatey v2.0.0
Installing the following packages:
python
By installing, you accept licenses for the packages.
Progress: Downloading python 3.11.3... 100%

python v3.11.3 [Approved]
python package files install completed. Performing other installation steps.
 The install of python was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\python'

> choco upgrade all --noop
You have python3 v3.11.3 installed. Version 3.12.0-b1 is available based on your source(s).

> choco upgrade python --noop
Chocolatey v2.0.0
_ Chocolatey:ChocolateyUpgradeCommand - Noop Mode _
python v3.11.3 is the latest version available based on your source(s).
pauby commented 1 year ago

@theperiscope Before we can look at this further, we need full logs for the runs where this happened. The best way to do that is to add a link to a gist containing the logs, to the issue above (please don't add it as a comment). See here for how to create a gist.

pauby commented 1 year ago

As a follow-up, I can't reproduce this (before this screenshot I ran choco install python --version 3.11.3):

image

theperiscope commented 1 year ago

@pauby sent log link via "Contact maintainers" via https://community.chocolatey.org/packages/chocolatey/ContactOwners as I didn't want them exposed publicly here

theperiscope commented 1 year ago

As a follow-up, I can't reproduce this (before this screenshot I ran choco install python --version 3.11.3):

image

Have you tried install without specifying the --version option? I'm thinking version may be a factor in the difference I observed.

pauby commented 1 year ago

I got the email. Thanks for sending it through. Unfortunately, there are none of those preview versions in the logs. I've responded back.

I ran it without --version and recorded it. Note that I paused while python311 was being installed, as it takes a while.

WindowsSandboxClient_R7NXcdmDw7

theperiscope commented 1 year ago

@pauby definitely odd and interesting, I'll see if I can think of anything extra. It did not happen on my Win 11 PC either earlier (that's why I included my sources list in the report). Let me know if there's another way I can help gather logs and I'd be happy to run my uninstall/install again.

pauby commented 1 year ago

If you can consistently reproduce the issue, then please provide detailed reproduction steps (so we can produce it here) and provide trace level logs if you can.

The easiest way is to add --log-file=<LOG FILENAME> --trace to the end of the choco commands:

theperiscope commented 1 year ago

@pauby I updated the gist with choco1.log produced by choco upgrade all command and choco2.log produced by choco upgrade python command... hope they provide a clue as I definitely see different versions suggested. One thing I noticed in choco1.log (lines 247, 248) that it lists two python packages.

Another observation that could be relevant - choco1.line 20365... the args do not show --prerelease while line 28842 (zoomit package, I must have used it at some point?!?) has it. It still unclear why python package picks up the prerelease with the upgrade all command and perhaps examining closer will lead to a clue.

theperiscope commented 1 year ago

@pauby I think we can close the isssue because there's no way for it to be accurately reproduced right now.

I spend last night examining the computer where it was happening and found that I could only uninstall some packages with --ignoreautouninstallerfailure -n options, had multiple competing python3 versions installed reported by Windows, etc. I know the issue did not occur with chocolatey 1.1.4 but we have no way of getting to solid root cause for a fix after the upgrade.

I appreciate the help and team behind it - chocolatey is (and has been for a long time) an extremely useful tool in personal and professional environments.

theperiscope commented 1 year ago

Closing

pauby commented 1 year ago

Thanks for confirming that and for sticking with us to help reproduce the issue. Even though we didn't get it reproduced, that's very much appreciated.