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

winget install should optionally upgrade only if a newer version is available #1411

Closed
matbech opened this issue Aug 29, 2021 · 7 comments
Closed
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Milestone

Comments

@matbech
Copy link

matbech commented Aug 29, 2021

Description of the new feature/enhancement

As a user I want to ensure that the latest version of package X is installed, whether this package is already installed (and optionally needs to be upgraded) or not. If the package is already installed and an upgrade is available, the upgrade should be done. If no upgrade is available, the package should not be reinstalled (which is currently the case with winget install). If the package is not installed, it should be installed.

To achieve this goal with the current implementation, I have to first run:
winget upgrade X
if the command fails with
"No installed package found matching input criteria."
ERRORLEVEL = -1978335212
Then I install the package with:
winget install X

If I call winget install X, the package will be reinstalled, even if the latest version of the package is already installed.

Proposed technical implementation details (optional)

I propose an additional command line switch --upgrade for the winget install command. If the switch is enabled, then the install command should only install (upgrade) the package if a newer version is available.

@matbech matbech added the Issue-Feature This is a feature request for the Windows Package Manager client. label Aug 29, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Aug 29, 2021
@matbech matbech changed the title Consolidation of install/upgrade winget install should optionally upgrade only if a newer version is available Aug 29, 2021
@denelon denelon removed the Needs-Triage Issue need to be triaged label Aug 30, 2021
@sanamhub
Copy link

I agree on it with @matbech

If the package is already installed and an upgrade is available, the upgrade should be done. If no upgrade is available, the package should not be reinstalled (which is currently the case with winget install). If the package is not installed, it should be installed.

WPM would be much welcome or adds much value to Windows Ecosystem as a Package Manager after implementation of these things @denelon

@denelon
Copy link
Contributor

denelon commented Oct 22, 2021

We have a couple of related bugs being actively worked on to improve this scenario.

@sanamhub
Copy link

Thanks for the update!
However this issue is related to install and they're related to upgrade so, this may need an extra work..

@sanamhub
Copy link

It would be great if this issue also get addressed in milestone v1.2-Client

@denelon
Copy link
Contributor

denelon commented Jan 5, 2022

This may be a duplicate.

See

@denelon denelon added this to the Backlog-Client milestone Feb 22, 2022
@denelon denelon modified the milestones: Backlog-Client, v1.4-Client Aug 5, 2022
@denelon
Copy link
Contributor

denelon commented Aug 5, 2022

Duplicate of #929

@denelon denelon marked this as a duplicate of #929 Aug 5, 2022
@denelon denelon closed this as completed Aug 5, 2022
@ghost
Copy link

ghost commented Aug 5, 2022

@matbech 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.

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

3 participants