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

Add package exclude list for 'winget upgrade --all' #1703

Closed
deadlydog opened this issue Nov 14, 2021 · 6 comments
Closed

Add package exclude list for 'winget upgrade --all' #1703

deadlydog opened this issue Nov 14, 2021 · 6 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Milestone

Comments

@deadlydog
Copy link

deadlydog commented Nov 14, 2021

Description of the new feature / enhancement

Sometimes you have a lot of packages to be upgraded, and updating them one at a time is very time consuming and cumbersome. You can use the winget upgrade --all feature, but there may be a few specific packages that you don't want updated. For example, there may be packages that you don't want to update for technical reasons (e.g. breaking changes in Ruby v2 to v3), or for other reasons, like your organization requires you to stay on a specific version of MS Office. Ideally, you could define a list of package IDs in the settings json file that winget upgrade --all would ignore.

Proposed technical implementation details

Add a new element to the settings.json schema that allows an array of package IDs to be specified which the upgrade --all flag excludes from upgrading. If there is an update available for a package defined in the exclude list, the upgrade --all command displays an information message that there is an update available for the package, but that it won't be installed because it is specified in the exclude list.

@deadlydog deadlydog added the Issue-Feature This is a feature request for the Windows Package Manager client. label Nov 14, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Nov 14, 2021
@deadlydog deadlydog changed the title Add package exclude list for 'winget upgrade -all' Add package exclude list for 'winget upgrade --all' Nov 14, 2021
@jedieaston
Copy link
Contributor

jedieaston commented Nov 14, 2021

Duplicate of #1439 (hopefully that's coming soon).

@deadlydog
Copy link
Author

deadlydog commented Nov 15, 2021

Thanks @jedieaston. I read over #1439 and this issue is definitely similar, but slightly different. I think that issue is mainly wanting a way to ignore all updates to a given package, to be used when winget upgrade <package> does not do the correct thing (due to the package not having correct metadata, or other things like that).

In this issue, I would still want to be able to update a given package using winget upgrade <package>; I just want it ignored when using winget upgrade --all. So I would still be able to update the package using winget when I explicitly specify the package.

So there are two different use cases:

  1. winget upgrade does not do the correct thing (for whatever reason).
  2. winget upgrade would do the correct thing, but the user simply wants explicit control over when that package gets upgraded.

Perhaps the same solution could be used to solve both problems (e.g. there's a single exclude list, but it can be overridden with winget upgrade <package> --ignore-exclude-list), but I think it's important to call out both use cases to ensure one is not overlooked.

@jedieaston
Copy link
Contributor

Agreed. I think a flag to override your pins/exclusions would be preferable.

@denelon
Copy link
Contributor

denelon commented Nov 16, 2021

Duplicate of #476

@denelon denelon marked this as a duplicate of #476 Nov 16, 2021
@ghost
Copy link

ghost commented Nov 16, 2021

@deadlydog we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority.

@ghost ghost closed this as completed Nov 16, 2021
@ghost ghost added Resolution-Duplicate Issue is a duplicate and removed Needs-Triage Issue need to be triaged labels Nov 16, 2021
@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
@exoosh
Copy link

exoosh commented Dec 14, 2022

Isn't the real underlying issue that winget crams all of the different ideas of "upgrade" into a single subcommand?

Thinking in terms of apt, you have upgrade but also dist-upgrade with different semantics. Pinning (#476) would at least be a stopgap solution.

I have the issue right now with VMware Workstation:

VMware Workstation                                        VMware.WorkstationPro               16.2.5           17.0.0       winget

Version 16.2.5 was released after 17.0.0 and using 17.0.0 requires a "renewal" of the license key which I don't want to rush at this point. So I can no longer use winget upgrade --all, because it would nuke my VMware Workstation Pro 16.x installation and upgrade it to 17.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Projects
None yet
Development

No branches or pull requests

4 participants