microsoft / microsoft/winget-cli

Tell what package requires what dependencies when `upgrade --all`

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

Nobody has claimed this yet.

Area-Output Command-Upgrade Dependencies Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

When doing upgrade --all, the required dependencies for one of the packages is listed before starting installing any application. Problem is, Winget does not say which package.

In following example it looks like Edge WebView is dependent on itself. But it's actually Cloudflare Warp that requires it.

...
Name                            Id                            Version       Available     Source
------------------------------------------------------------------------------------------------
Microsoft Edge WebView2 Runtime Microsoft.EdgeWebView2Runtime 123.0.2420.65 123.0.2420.81 winget
Cloudflare WARP                 Cloudflare.Warp               24.2.69.0     24.3.409.0    winget
2 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
4 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Microsoft.EdgeWebView2Runtime [>= 91.0.864.53]
(1/2) Found Microsoft Edge WebView2 Runtime [Microsoft.EdgeWebView2Runtime] Version 123.0.2420.81
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://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/5afa70b3-c1d2-499e-b1a9-fe27ccf094b4/MicrosoftEdgeWebView2RuntimeInstallerX64.exe
  ██████████████████████████████   169 MB /  169 MB
Successfully verified installer hash
Starting package install...
Successfully installed
...
Proposed technical implementation details

Say what package requires what dependency/dependencies.

  • Instead of "this packages", say "Cloudflare.Warp"?

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

Reproduce the example with upgrade --all and trace the code that prints the dependency-installation message. Update the output so it identifies the package requiring each dependency, then verify that the displayed package and dependency relationship is correct for multi-package upgrades.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
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.