Skip to content
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

Winget wants to upgrade up-to-date packages #193711

Open
avysk opened this issue Nov 25, 2024 · 7 comments
Open

Winget wants to upgrade up-to-date packages #193711

avysk opened this issue Nov 25, 2024 · 7 comments
Labels
Upgrade-Always-Available The package manager always offers an upgrade, possibly due to a metadata issue.

Comments

@avysk
Copy link

avysk commented Nov 25, 2024

Brief description of your issue

Winget wants to upgrade DOSBox-X to version 2024.10.01. However, Windows sees it as already installed
Image
Performing the upgrade does not help.

Steps to reproduce

winget upgrade shows

DOSBox-X 2024.03.01 (32/64bit for XP) joncampbell123.DOSBox-X < 2024.10.01 2024.10.01 winget

Expected behavior

I would expect that winget does not offer upgrade the package to the same version, as already installed (notice that Windows sees the right version).

Actual behavior

Upgrade of DOSBox-X is constantly offered.

Environment

❯ winget --info
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.2314
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0

Winget Directories
-----------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Loc…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Loc…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                D:\Downloads

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
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled


Windows 11, 24H2 (26100.2314)
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Nov 25, 2024
@denelon denelon added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Nov 25, 2024
@denelon denelon transferred this issue from microsoft/winget-cli Nov 25, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@Trenly
Copy link
Contributor

Trenly commented Nov 25, 2024

@avysk - Can you share the output and log files from winget list dosbox --verbose --logs? I'm not able to reproduce this on a fresh install -

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget list dosbox
Name                                       Id                      Version    Source
-------------------------------------------------------------------------------------
DOSBox-X 2024.10.01 (32/64bit for Windows) joncampbell123.DOSBox-X 2024.10.01 winget
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget upgrade
No installed package found matching input criteria.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback This needs a response from the author. and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels Nov 25, 2024
@stephengillie stephengillie added Upgrade-Always-Available The package manager always offers an upgrade, possibly due to a metadata issue. Needs-Author-Feedback This needs a response from the author. and removed Needs-Author-Feedback This needs a response from the author. labels Nov 25, 2024
@avysk
Copy link
Author

avysk commented Nov 26, 2024

Hmm. Because of some reason winget sees two versions:

❯ winget list dosbox --verbose --logs
Name                                                 Id                      Version      Available  Source
-----------------------------------------------------------------------------------------------------------
DOSBox-X 2024.03.01 (32/64bit for XP)                joncampbell123.DOSBox-X < 2024.10.01 2024.10.01 winget
DOSBox-X 2024.10.01 (32/64bit for Windows) (All use… joncampbell123.DOSBox-X 2024.10.01              winget

I wonder what is happening because Windows (as I showed above) sees only one.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention This work item needs to be reviewed by a member of the core team. and removed Needs-Author-Feedback This needs a response from the author. labels Nov 26, 2024
@Trenly
Copy link
Contributor

Trenly commented Nov 26, 2024

@denelon - this should be moved to CLI; Area-Matching and Side-by-Side

@avysk - you might be able to get around this by using the exact name to uninstall the older version -

winget uninstall "DOSBox-X 2024.03.01 (32/64bit for XP) "

@avysk
Copy link
Author

avysk commented Nov 26, 2024

This completely removed DOSBox-X from my system. I have reinstalled it with winget install dosbox-x and winget upgrade no longer shows it. Before I did it I launched DOSBox-X and checked the version in Help|About; it was 2024.10.01.

@Trenly
Copy link
Contributor

Trenly commented Nov 26, 2024

This completely removed DOSBox-X from my system. I have reinstalled it with winget install dosbox-x and winget upgrade no longer shows it. Before I did it I launched DOSBox-X and checked the version in Help|About; it was 2024.10.01.

Interessting. . .
Seems like there must have been something about the installer that didn’t clean up all the old version information

Glad to hear that a reinstall fixed it!

@stephengillie stephengillie removed Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention This work item needs to be reviewed by a member of the core team. labels Nov 26, 2024
@stephengillie
Copy link
Collaborator

The package manager operates by matching data in repo against data in Registry. Sometimes, this bug is caused by having old Registry entries, and sometimes uninstalling the actually-installed package also removes those orphaned entries. Such might have occurred here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upgrade-Always-Available The package manager always offers an upgrade, possibly due to a metadata issue.
Projects
None yet
Development

No branches or pull requests

4 participants