microsoft / microsoft/winget-cli

`winget upgrade` offers older versions of already installed packages with non-standard versioning schemes

Open
#3,126 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

For some packages winget upgrade offers older versions of packages.

image

In this case, it is offering

  • for CrystalDiskMark it is offering 8.0.4 which is older than the already installed 8.0.4a
  • for Stardock.Fences it is offering 4.07.02 which is older than the already installed 4.1.0.6

I'm not sure how CrystalDiskMark was upgraded to 8.0.4a (probably manually by CrystalDiskMark installer by me), Fences was upgraded to 4.1.0.6 by its own built-in upgrade mechanism

I know that those applications have non-standard versioning schemes (a suffix for CrystalDiskMark and 0 prefix in the minor version number for Fences) and I don't know if this is really a bug and if that should be handled in the package manifests somehow but I'm reporting it just in case there is some space for winget version matching improvement (not sure whether this relates to Matching logic needs to be updated #2995
)

Steps to reproduce

run winget upgrade | grep -E "CrystalDiskMark|Fences" with the latest versions of CrystalDiskMark / Fences installed

Expected behavior

winget upgrade shouldn't be offering older versions of already installed packages

Actual behavior

winget upgrade is offering older versions of already installed packages with non-standard versioning schemes

Environment
@pavel λ winget --info
Windows Package Manager (Preview) v1.5.441-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.1413
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.441.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with winget upgrade | grep -E "CrystalDiskMark|Fences" using the versions and environment described, then inspect the upgrade version-matching path and the referenced package manifests. Done means winget upgrade no longer offers a version older than the installed package and selects the available newer CrystalDiskMark version when appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.