-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 upgrade --all
shouldn't install the same package more than once
#1105
Comments
Should this be of type: Issue-bug? |
I had a couple of R updates and had some old versions left on my system, winget didn't detect that 4.1.0 is already installed and "upgraded" these 3 versions 3 times for each run. Name Id Version Available SourceR for Windows RProject.R 4.0.3 4.1.0 winget If I don't remove the old versions every time when I run it winget, it tries to "upgrade" these 3 packages 3 times on each run. To me this is a bug, actually two bugs here:
I did remove old versions, but some people might have legitimate reasons to keep multiple versions, winget should not try to upgrade anything if there are multiple versions and the highest version = current version. |
I'll switch the labels from "Issue-Feature" to "Issue-Bug". I'll share some of my original thinking about why I created this as a feature. When we designed the upgrade experience we didn't encounter this scenario. The client isn't throwing any exceptions. I perceived it as more of an improvement to the current experience than a bug. The current experience is clearly annoying and a waste of resources, but it is "by design". One persons feature could always be another persons bug. Thank you both for contributing! |
What made you think this as a feature in the first place? Just curious to understand the reasoning behind. It's an interesting position to have |
I tend to think of "bugs" in terms of unintended behavior a a result of some sort of flawed logic implemented, or an unexpected interaction between dependencies. This would be in terms of "it did what I expected when I wrote it and tested it, but I didn't expect this other behavior it exhibited." For me, the Ultimaker.Cura package was the first I ran across with intentional "side-by-side" installation for newer versions. I thought it was strange when I had two versions on my machine and saw upgrade try to upgrade both of them. I hadn't realized when I ran upgrade the first time, that the older version persisted. Since then, I've seen other packages like C++ runtimes, and other programming languages. As I stated in my earlier comment, I perceived this Issue as an improvement in the behavior. The code was doing what it had originally been expected to do. Hence, not a bug. I think it's just a philosophical perspective. That's why I made the comment about one person's feature and another person's bug. Sometimes there is more than one right answer 😊. |
I am seeing the latest comment on this thread is from more than 2 months ago, is there any update about this issue? I am seeing the exact behavior, about 6 applications (apparently some kind of version bugged) which get reinstalled again and again when running winget upgrade -h --all. I am running v1.2.3411-preview. I love the tool and works seamless for other applications. |
If you're having issues with upgrading applications that don't display a version in Control Panel, it's fixed in #1765 and will most likely be included in the next WinGet preview release. |
Current production version is doing the reverse:
|
Unity have a tendency of installing over an over again.
|
Description of the new feature/enhancement
Some packages support "side by side" installation. Executing
winget upgrade --all
shouldn't attempt to install the same "latest" version of a package more than one time.Examples:
Cura - The .exe installs separate versions into Add / Remove Programs intentionally
Unity - microsoft/winget-pkgs#16038
Proposed technical implementation details (optional)
When the command is executed, check the list of packages to be upgraded. If the same "PackageIdentifier" is found as a possible upgrade more than one time, only execute the upgrade once.
The text was updated successfully, but these errors were encountered: