`winget upgrade --all` should not list upgrades it's not going to apply
Brief description of your issue
Under some circumstances, no real updates to an installed application are available.
For instance, no 32-bit update might exist for a given application.
(in my repro case, 3 applications are in that case)
In that case, winget upgrade --all should not list that updates are available for those applications.
Alternatively, a specific message should be displayed.
Steps to reproduce
Run winget upgrade --all on a 32-bit Windows machine with Git.Git version 2.39.2 installed.
Expected behavior
winget upgrade --all should not indicate that Git.Git can be upgraded to version 2.42.0.2, as there is no 32-bit version 2.42.0.2.
Actual behavior
PS❯ winget upgrade --all
Name Id Version Available Source
--------------------------------------------------------------------------------
Git Git.Git 2.39.2 2.42.0.2 winget
TreeSize Free V4.5.3 (32-bit) JAMSoftware.TreeSize.Free 4.5.3 4.7.0 winget
UltraSearch V2.3.2 JAMSoftware.UltraSearch 2.3.2 4.0.2 winget
3 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
Here are the logs: WinGet-2023-09-23-16-07-08.169.log.zip
Environment
Windows Package Manager v1.5.2201
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19045.3324
System Architecture: X86
Package: Microsoft.DesktopAppInstaller v1.20.2201.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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\WinGet\Packages
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
I found uninstalling and installing with winget solved all these packages.
I found uninstalling and installing with winget solved all these packages.
This clearly doesn't fit with my problem description: if I have Git.Git version 2.39.2 installed on 32-bit Windows, uninstalling probably would be irreversible (unless the winget source offers that version to 32-bit systems), and after reinstalling, winget upgrade would keep offering a non-applicable upgrade.
Here's another occurrence of the same issue:
- Related to https://github.com/microsoft/winget-cli/issues/2883