microsoft / microsoft/winget-cli

`winget upgrade --all` should not list upgrades it's not going to apply

Open
#3,664 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Output Command-Upgrade 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

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

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

Start by reproducing the issue with winget upgrade --all on a 32-bit Windows machine using the Git.Git example, then inspect the upgrade-all command path and the attached WinGet log. Trace where candidate upgrades are listed versus filtered for applicability. Done means packages with no applicable architecture-specific update are omitted or receive a specific explanatory message.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.