chocolatey / choco

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

Incompatible meta/install packages lead to unnecessary downgrade #3461

Open Terrance opened 3 weeks ago

Terrance commented 3 weeks ago

Checklist

What You Are Seeing?

The latest version of vscode.install is 1.90.0, but vscode is still on 1.89.1 as the 1.90.0 release is still in moderation. This seems to cause weird behaviour when upgrading, as 1.89.1 is installed first, then 1.90.0 is attempted and fails, and at that point 1.89.0 rather than 1.89.1 is chosen instead. This means I was actually downgraded as a result of the "upgrade", having originally started on 1.89.1.

What is Expected?

I should be kept on version 1.89.1 as the latest release with matching meta/install packages.

How Did You Get This To Happen?

choco upgrade all, having started on vscode 1.89.1 and vscode.install 1.89.1, resulted in vscode 1.89.0 and vscode.install 1.89.0. Subsequent upgrade attempts stay at these version.

System Details

Installed Packages

chocolatey 2.3.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-misc-helpers.extension 0.0.4
chocolatey-os-dependency.extension 0.0.1
chocolatey-windowsupdate.extension 1.0.5
vscode 1.89.0
vscode.install 1.89.0

Output Log

https://gist.github.com/Terrance/751c1aa8dcf107e2a0e20aaa33519324

Additional Context

There seems to be two issues here: the packages themselves being mismatched, but also the downgrade from the latest meta package (for which the install package is available) to the one before.

Outek commented 2 weeks ago

I have the same bug on servers with a newly upgraded chocolatey client.

# Choco Search cannot find the newest version
PS D:\> choco search vscode
Chocolatey v2.3.0
vscode 1.86.2
1 packages found.

# Pre Package found
PS D:\> choco search vscode -pre
Chocolatey v2.3.0
vscode 1.90.0

# Choco search
PS D:\> choco search vscode -all
Chocolatey v2.3.0
vscode 1.90.0
vscode 1.89.1
vscode 1.89.0
vscode 1.88.1
vscode 1.88.0
vscode 1.87.2
vscode 1.87.0
vscode 1.86.2
vscode 1.86.1
vscode 1.86.0
vscode 1.85.2
vscode 1.85.1
vscode 1.85.0
vscode 1.84.2
vscode 1.84.0
vscode 1.83.1
vscode 1.83.0
vscode 1.81.1
vscode 1.81.0
vscode 1.80.2
vscode 1.80.1
vscode 1.80.0
vscode 1.79.2
vscode 1.79.0
vscode 1.78.2
vscode 1.78.0
vscode 1.77.3
vscode 1.77.1
vscode 1.77.0
vscode 1.76.2
vscode 1.76.1
vscode 1.76.0
vscode 1.75.1
vscode 1.75.0
vscode 1.74.3
vscode 1.73.1