Closed theperiscope closed 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).
@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.
As a follow-up, I can't reproduce this (before this screenshot I ran choco install python --version 3.11.3
):
@pauby sent log link via "Contact maintainers" via https://community.chocolatey.org/packages/chocolatey/ContactOwners as I didn't want them exposed publicly here
As a follow-up, I can't reproduce this (before this screenshot I ran
choco install python --version 3.11.3
):
Have you tried install without specifying the --version
option? I'm thinking version may be a factor in the difference I observed.
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.
@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.
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:
--log-file
means that Chocolatey CLI will write logs for that single command, so the log file. It's easier to just provide those completely rather than digging into the chocolatey.log
.--trace
gives us more logging around queries (it may not help us, but better to gather them anyway).@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.
@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.
Closing
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.
Checklist
What You Are Seeing?
Preview packages got installed after issuing
choco upgrade all
command with chocolatey 2.0.0What 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):Interestingly, after I manually uninstalled and reinstalled, for example
powershell-core
with--exclude-preview
option the subsequentchoco upgrade all
does not suggest preview version.choco sources list
:System Details
Installed Packages
Output Log
Additional Context
No response