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

Packages with the same ID and name in multiple repos break "winget show" and "winget install" #840

Open
jedieaston opened this issue Apr 1, 2021 · 6 comments
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@jedieaston
Copy link
Contributor

Brief description of your issue

Packages with the same ID and name in multiple repos break winget show and winget install

Steps to reproduce

  1. Add more than one repo to winget somehow (for example, the msstore repo that you can add via experimental).
  2. run winget show --exact --id Microsoft.WindowsTerminal
  3. Become confused when even though you passed --exact --id, there are still two results.

Expected behavior

WinGet should put the different repos in the returned table, and say "This package exists in multiple repos, specify which you want to show/install from with --source ".

Alternatively, it should just pick whichever one has the highest version (or the user's specified version if they pass -v), which is what other package managers do when faced with this problem (this probably makes a bit more sense in the long run, given that one of the major reasons people add additional repositories is to get access to newer versions of software that aren't ready for public consumption, like canary versions of browsers).

Actual behavior

WinGet tells me it found multiple results, but doesn't tell me why (since there are no repos in the table), making it extremely difficult to figure out why I can't install Windows Terminal.


PS C:\Users\Easton Pillay\projects\winget-pkgs> winget install Microsoft.WindowsTerminal
Multiple packages found matching input criteria. Please refine the input.
Name             Id
------------------------------------------
Windows Terminal Microsoft.WindowsTerminal
Windows Terminal Microsoft.WindowsTerminal
PS C:\Users\Easton Pillay\projects\winget-pkgs> winget install --exact --id Microsoft.WindowsTerminal
Multiple packages found matching input criteria. Please refine the input.
Name             Id
------------------------------------------
Windows Terminal Microsoft.WindowsTerminal
Windows Terminal Microsoft.WindowsTerminal
PS C:\Users\Easton Pillay\projects\winget-pkgs> # Uh-oh!

Environment

PS C:\Users\Easton Pillay\projects\winget-pkgs> winget --info
Windows Package Manager v0.2.10771 Preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19042.867
Package: Microsoft.DesktopAppInstaller v1.11.10771.0

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

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
PS C:\Users\Easton Pillay\projects\winget-pkgs>
@ghost ghost added the Needs-Triage Issue need to be triaged label Apr 1, 2021
@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels Apr 1, 2021
@denelon
Copy link
Contributor

denelon commented Apr 1, 2021

Great catch @jedieaston. We've been thinking about adding preferences to the settings that would allow a user to specify which source should be used when there are multiple matches. I like the idea of comparing which has the latest version. One of the challenges is the store source doesn't currently expose the version.

@denelon
Copy link
Contributor

denelon commented Apr 27, 2021

@deadundead, this happens when there are two identical package identifiers in two different sources.

You will need to specify the source to disambiguate.

winget install Microsoft.WindowsTerminal -e -s winget would use the "default" source.

It looks like we need to clarify the messaging, and display the sources in this case.

@spragginsdesigns
Copy link

@deadundead, this happens when there are two identical package identifiers in two different sources.

You will need to specify the source to disambiguate.

winget install Microsoft.WindowsTerminal -e -s winget would use the "default" source.

It looks like we need to clarify the messaging, and display the sources in this case.

This is literally happening to me right now. Look at this screenshot:
image

@tardis4500
Copy link

tardis4500 commented Oct 19, 2021

I don't think this is just a documentation issue. Consider the following:

PS C:\Users\gmhum> winget upgrade -e --id Microsoft.VC++2013Redist-x64 -s winget
Multiple installed packages found matching input criteria. Please refine the input.
Name                                                         Id
---------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2013 Redistributable (x64)              Microsoft.VC++2013Redist-x64
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501 {050d4fc8-5d48-4b8f-8972-47c82c46020f}
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.40664 {9dff3540-fc85-4ed5-ac84-9e3c7fd8bece}
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501 {f65db027-aff3-4070-886a-0d87064aabb1}

@remontees
Copy link

I don't think this is just a documentation issue. Consider the following:

PS C:\Users\gmhum> winget upgrade -e --id Microsoft.VC++2013Redist-x64 -s winget
Multiple installed packages found matching input criteria. Please refine the input.
Name                                                         Id
---------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2013 Redistributable (x64)              Microsoft.VC++2013Redist-x64
Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501 {050d4fc8-5d48-4b8f-8972-47c82c46020f}
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.40664 {9dff3540-fc85-4ed5-ac84-9e3c7fd8bece}
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501 {f65db027-aff3-4070-886a-0d87064aabb1}

I experienced the same issue installing Oracle.JDK.17

@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

[Policy] Area-Matching

@microsoft-github-policy-service microsoft-github-policy-service bot added the Area-Matching Issue related to correlation between installed package and manifest label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

6 participants