microsoft / microsoft/winget-cli
Number/list of updates available totally broken, `update` not working
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
Hi, i found a few problems with the update command, but i'm not even sure if these are all of them, so please see the log at the end that might be clearer than my explanations/suppositions.
When running update commands, to list available updates or to update packages, a number of problems occur:
- some packages get skipped; see the output below:
update --all --include-unknowntries to update 3 out of 6 listed packages. More details:- for a couple of packages (powershell, visual studio) cannot be updated via
update --allnorupdate --id ..., the update commands simply skips them and reports "no applicable update found"; in reality, visual studio's already installed version is 17.6.2 (so an update should be available) and powershell version is 7.3.4 (so the lastest version is already installed) - also another package, with "unknown" version number (windirstat) gets skipped too, when using
--include-unknown
- for a couple of packages (powershell, visual studio) cannot be updated via
- the other packages with "unknown version number"s, are kind of updated with
update --all --include-unknown, meaning each one of them gets installed successfully, but still end up with "unknown" version after installation (idk maybe this is the expected behaviour?), so they are perpetually listed as having an update available - the
update --allcommand reports twice the line "X packages have version numbers that cannot be determined. Use --include-unknown to see all results", the second time with a totally random number
I don't even know if these problems are related to each other, of if i should open a separate issue for some/all of them. Please notice me if i should do that.
Also please rename the issue if a better title could be found.
Steps to reproduce
i don't know, aside running the commands below, while having the following software installed:
- google cloud sdk 435.0.1
- megasync 4.9.4
- speedfan 4.52
- windirstat 1.1.2
- visual studio community 2022 17.6.2
- powershell 7.3.4
Expected behavior
updateshould report the correct versions (powershell is wrong, 7.3.4 is already installed)update --all [--include-unknown]should update every package, not skipping over any one of them (powershell, visual studio, windirstat)update --id ...should work, but i think this is probably issue #3093update --allshould not report a wrong number of packages with unknown version numbers, and especially should not report it twice; maybe this is #2458 ?- (MAYBE)
update --all --include-unknownshould register the "available version" as the "installed version" for packages that have unknown version number and get updated successfully; having them all repeatedly updated each time i run that command, is annoying (also because some updates take a very long time, for example the google cloud sdk takes over 5 minutes on my machine). Of the 6 updates that are listed as available on my pc, everything is already up to date except visual studio community, which is even skipped for some reason - anything else that might be wrong in the log below
Actual behavior
> winget -v
v1.4.11071
> winget update
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.3 winget
PowerShell 7.3.2.0-x64 Microsoft.PowerShell 7.3.2.0 7.3.4.0 winget
2 upgrades available.
4 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
> winget update --include-unknown
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Google Cloud SDK Google.CloudSDK Unknown 431.0.0 winget
MEGAsync Mega.MEGASync Unknown 4.9.4.0 winget
SpeedFan (remove only) Almico.SpeedFan Unknown 4.52 winget
WinDirStat 1.1.2 WinDirStat.WinDirStat Unknown 1.1.2 winget
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.3 winget
PowerShell 7.3.2.0-x64 Microsoft.PowerShell 7.3.2.0 7.3.4.0 winget
6 upgrades available.
> winget update --all
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.3 winget
PowerShell 7.3.2.0-x64 Microsoft.PowerShell 7.3.2.0 7.3.4.0 winget
2 upgrades available.
4 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
14 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
> winget update microsoft.powershell
No applicable upgrade found.
> winget update --id microsoft.powershell
No applicable upgrade found.
> winget update --id microsoft.visualstudio.2022.community
No applicable upgrade found.
> winget update --include-unknown --all
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Google Cloud SDK Google.CloudSDK Unknown 431.0.0 winget
MEGAsync Mega.MEGASync Unknown 4.9.4.0 winget
SpeedFan (remove only) Almico.SpeedFan Unknown 4.52 winget
WinDirStat 1.1.2 WinDirStat.WinDirStat Unknown 1.1.2 winget
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.3 winget
PowerShell 7.3.2.0-x64 Microsoft.PowerShell 7.3.2.0 7.3.4.0 winget
6 upgrades available.
(1/3) Found Google Cloud SDK [Google.CloudSDK] Version 431.0.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe
██████████████████████████████ 148 KB / 148 KB
Successfully verified installer hash
Starting package install...
Successfully installed
(2/3) Found MEGAsync [Mega.MEGASync] Version 4.9.4.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://mega.nz/MEGAsyncSetup64.exe
██████████████████████████████ 51.6 MB / 51.6 MB
Successfully verified installer hash
Starting package install...
Successfully installed
(3/3) Found SpeedFan [Almico.SpeedFan] Version 4.52
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.almico.com/instspeedfan452.exe
██████████████████████████████ 2.94 MB / 2.94 MB
Successfully verified installer hash
Starting package install...
Successfully installed
Environment
Windows Package Manager v1.4.11071
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.1848
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.11071.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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the listed winget update, update --all, and --include-unknown commands in the reported Windows Package Manager environment. Compare package selection, unknown-version counts, and post-install results with the expected behavior; done means the reported update and counting problems are resolved and the relevant command behavior is covered by regression tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100