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

--include-unknown shows a lower number of packages after running "winget upgrade --all" #2458

Open
HeinVG opened this issue Aug 18, 2022 · 7 comments
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation. Side-by-Side Issue related to side by side package installation
Milestone

Comments

@HeinVG
Copy link

HeinVG commented Aug 18, 2022

Brief description of your issue

When running winget upgrade to update packages on my Windows 11 system, I'm running into the following behavior:

image

As you can see in the screenshot above, winget says there's 8 packages with version numbers it can't be determined, but using the flag of --include-unknown to list them all shows only 3

Steps to reproduce

Run "winget upgrade --all" let it install all upgrades/updates and check for the output of how many packages are missing

Expected behavior

It should match the same number of packages when you'll run "winget upgrade --include-unknown"

Actual behavior

The number of packages with version numbers that can't be determined are mismatching

Environment

winget --info:
Windows Package Manager (Preview) v1.4.2161-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.382
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.2161.0

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

-- 
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621
@ghost ghost added the Needs-Triage Issue need to be triaged label Aug 18, 2022
@denelon
Copy link
Contributor

denelon commented Aug 18, 2022

Do you see other packages in winget list that could account for the difference? I'm wondering if it's related to another source.

@denelon denelon added Needs-Author-Feedback Issue needs attention from issue or PR author Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Aug 18, 2022
@HeinVG
Copy link
Author

HeinVG commented Aug 18, 2022

@denelon you might have nailed it, I'm seeing the 8 packages with unknown version there, 3 coming from winget while the rest don't (some are Steam games just to give you an idea of what's seeing).

@ghost ghost added Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels Aug 18, 2022
@florelis
Copy link
Member

I took a quick look at the code and saw two possible sources for inconsistencies with the unknown count

  1. When listing available upgrades we first filter the unknown installed versions and count them there, but we may later remove other packages that are not available from any source. So the count of unknown includes those un-available packages that are not listed with --include-unknown. That's probably what happened here.

  2. When performing the upgrades we first filter the unknown versions and count them there, but we later remove packages where the update is not applicable (e.g., mismatched architecture). So the count of unknown includes the non-applicable updates that are not applied with --include-unknown.

@denelon
Copy link
Contributor

denelon commented Jul 27, 2023

@albertocavalcante
Copy link

Just wanted to share I am facing the same issue.

Here's my output.

$ winget upgrade --all                                                                                                                                                                                                                                                                                                                                                  
Name                                                        Id                          Version    Available  Source
--------------------------------------------------------------------------------------------------------------------
Rancher Desktop 1.8.1                                       suse.RancherDesktop         1.8.1      1.11.1     winget
JetBrains Gateway                                           JetBrains.Gateway           > 2022.3.2 2023.3.2   winget
RustRover                                                   JetBrains.RustRover         2023.2 EAP 2023.2     winget
Notion 2.0.23                                               Notion.Notion               2.0.23     3.1.0      winget
Microsoft Visual C++ 2010  x86 Redistributable - 10.0.30319 Microsoft.VCRedist.2010.x86 10.0.30319 10.0.40219 winget
PowerShell 7.2.17.0-x64                                     Microsoft.PowerShell        7.2.17.0   7.4.0.0    winget
6 upgrades available.

Installing dependencies:
(1/1) Found Notion [Notion.Notion] Version 3.1.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://desktop-release.notion-static.com/Notion%20Setup%203.1.0.exe
  ██████████████████████████████  79.4 MB / 79.4 MB
Successfully verified installer hash
Starting package install...
Successfully installed

1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

@denelon
Copy link
Contributor

denelon commented Apr 2, 2024

We've been working on the side-by-side scenarios. You could try the latest release and enable the experimental feature on:

Please provide feedback at:

@metamec
Copy link

metamec commented Jun 29, 2024

This was bugging me for a while. Then I entered winget list | Where-Object { $_ -match 'Unknown' } and realised games installed with the Steam client (many of them since uninstalled) were polluting the list.

So many entries like: "ARP\Machine\X64\Steam App 219150"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Upgrade Issue related to WinGet Upgrade Issue-Bug It either shouldn't be doing this or needs an investigation. Side-by-Side Issue related to side by side package installation
Projects
None yet
Development

No branches or pull requests

5 participants