microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.27k stars 1.45k forks source link

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

Open o-l-a-v opened 7 months ago

o-l-a-v commented 7 months ago

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.

mdanish-kh commented 7 months ago

[Policy] Area-Output