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

Configure Behaviors for multiple sources #1488

Open
denelon opened this issue Sep 20, 2021 · 7 comments
Open

Configure Behaviors for multiple sources #1488

denelon opened this issue Sep 20, 2021 · 7 comments
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@denelon
Copy link
Contributor

denelon commented Sep 20, 2021

Configure Behaviors for multiple sources

Sometimes the same package is in multiple sources.

Now the Windows Package Manager has access to the Microsoft Store, the Community Repository, and private sources. We need better behaviors.

Proposed technical implementation details (optional)

One possibility is to have users continue to disambiguate when a package exists in multiple sources.
Another possibility is to have a "priority" on sources so the top priority source will be used (unless specified with --source).

@denelon denelon added the Issue-Feature This is a feature request for the Windows Package Manager client. label Sep 20, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Sep 20, 2021
@denelon denelon removed the Needs-Triage Issue need to be triaged label Sep 20, 2021
@Trenly
Copy link
Contributor

Trenly commented Sep 21, 2021

My personal preference as a user would be to have the priority of sources, and potentially to have this be configurable through settings. I would imagine that Microsoft Store should have the top priority by default, then community, then private sources. However, I can see a use case where perhaps a user would like a private source or the community repository to have higher priority.

This could be configurable by having a list of sources in the settings file such as:

"SourcePriority": {
    "winget" :  1,
    "microsoft":  2,
    "UserDefined": 0,
    "AnotherUDS": 1,
    "LowerPriority":  -1
}

The higher the number, the higher the priority. If two are tied for priority, then whichever comes first. Any sources that aren't defined in the priority list would be treated as priority 0, with the exception of the community repository and Microsoft store, which could default to 1 and 2 respectively. Any sources which have a defined priority but don't exist in the sources list could be ignored safely.

Edit: related to #1344 (comment)

@voltagex
Copy link

voltagex commented Oct 2, 2021

Currently the user experience isn't great, and it gets worse due to poor searching of the MS Store

image
image

@spragginsdesigns
Copy link

My personal preference as a user would be to have the priority of sources, and potentially to have this be configurable through settings. I would imagine that Microsoft Store should have the top priority by default, then community, then private sources. However, I can see a use case where perhaps a user would like a private source or the community repository to have higher priority.

This could be configurable by having a list of sources in the settings file such as:

"SourcePriority": {
    "winget" :  1,
    "microsoft":  2,
    "UserDefined": 0,
    "AnotherUDS": 1,
    "LowerPriority":  -1
}

The higher the number, the higher the priority. If two are tied for priority, then whichever comes first. Any sources that aren't defined in the priority list would be treated as priority 0, with the exception of the community repository and Microsoft store, which could default to 1 and 2 respectively. Any sources which have a defined priority but don't exist in the sources list could be ignored safely.

Edit: related to #1344 (comment)

I wish this had been implemented already. I will add it and comment it out but would any of this conflict with PS Gallery cmdlets or anything else? I am sure not just double-checking.

@denelon
Copy link
Contributor Author

denelon commented Oct 6, 2021

There shouldn't be any conflict with comments in the settings file. We're expecting the cmdlets to be a wrapper/interface to the COM API longer term. In the short term we will likely use crescendo to wrap the client, so the settings should be honored regardless of how the tool is used.

@spragginsdesigns
Copy link

@denelon Okay, so this will have nothing to do with the settings file. That makes sense as the settings are personalized, while something this big shouldn't be in the settings file.

@Benjin
Copy link

Benjin commented Jan 7, 2022

Another (simplified) proposal: just have a default.

winget source set-default winget or winget source set-default msstore

then when I run winget install powershell:

  • if my default source has it, then it automatically installs from the default
  • if default doesn't, but one other does, then it automatically installs from there
  • if default doesn't, but multiple others do, then it shows the existing "Multiple packages found matching input criteria. Please refine the input." message

@Trenly's proposal is more robust, though, so I'm fine with that as well.

@Sharken03
Copy link

I know WinGet is not a paid product, but this feature is crucial for replacing Chocolatey as the number one package manager. So please don't keep putting it on the backlog.

The user must be able to install using a moniker in the following way:

Winget install 7zip
Winget install vlc
Winget install dotnet

If you could do this, there would be little point in using Chocolatey anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

6 participants