winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

winget always tries to update packages that are already up to date

Open Un1q32 opened this issue 2 years ago • 8 comments

Brief description of your issue

Every time I run winget upgrade --all it tries to update VLC, it finishes and says it's successful, and opening VLC confirms that it was successful in updating, but it keeps updating every time I run winget upgrade --all, even though it's already up to date. The same issue has happened with other packages.

Steps to reproduce

Wait for an installed package to get an update Run winget upgrade --all It updates the package Check that package is updated (it should be) Run winget upgrade --all again It will attempt to update the package again

Expected behavior

winget upgrade --all should report that there are no updates when all packages are up to date.

Actual behavior

winget upgrade --all attempts to update packages that it has previously updated even though they are already up to date.

Environment

Windows Package Manager v1.2.10271
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.613
Package: Microsoft.DesktopAppInstaller v1.17.10271.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
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Un1q32 avatar Apr 20 '22 19:04 Un1q32

https://code.videolan.org/videolan/vlc/-/issues/26850

denelon avatar Apr 20 '22 19:04 denelon

@denelon I guess this is an issue with vlc then, but I've had the same issue with updating visual c++ with winget. Is that caused by the same issue?

Un1q32 avatar Apr 20 '22 19:04 Un1q32

No, VC++ is different.

  • microsoft/winget-cli/issues/1413

denelon avatar Apr 20 '22 19:04 denelon

Several installations don't adjust/set DisplayVersion in the registry. Leading to winget downloading and installing said programs upon every update.
Looking through the open issues in the v1.3 milestone roadmap, suggests that there are efforts being made to hopefully solve this. I'm hoping that reporting/setting the correct version will be mandatory, and not an optional thing. And if the installer doesn't set the correct version, maybe winget should?

I'm sure the devs have a long-term and good plan being worked on. That will solve this annoyances in the long term.

cloudrootab avatar Apr 21 '22 09:04 cloudrootab

imho maybe there could be a winget feature that makes sure the version is correctly updated when the installer succeeds. Which could also be a step forward to support archive files instead of installers only.

cjwijtmans avatar May 12 '22 20:05 cjwijtmans

The question is should winget fail an install when the installer failed to update the version. Which leaves the machine with an installed software that is incorrect somehow. Which could be fixed by sandboxing the installation first and if its correct then write the files from the sandbox on the system. Which is how some package managers work on linux. OR should winget correct the version string after a succesful install if the installer failed to do it? Which still doesnt gaurentee that the installed software was correct.

cjwijtmans avatar Jun 13 '22 14:06 cjwijtmans

There are a couple of features in the works to start addressing this. One is verifying what happens in an upgrade scenario. I've seen reports where during upgrade, the version isn't properly modified. It's likely we would depend on the Independent Software Vendor (ISV) / publisher to correct the installer behavior.

denelon avatar Jun 13 '22 14:06 denelon

There are a couple of features in the works to start addressing this. One is verifying what happens in an upgrade scenario. I've seen reports where during upgrade, the version isn't properly modified. It's likely we would depend on the Independent Software Vendor (ISV) / publisher to correct the installer behavior.

Food for thought. If the ISV's did their part correctly. Then this wouldn't be an issue to begin with. So I'm hoping for some sort of failsafe for the plethora of installers that don't update the versions correctly in the long term. Two cents deposited. And I'm sure/hopeful that the aforementioned "features in the works", will be the best solution to a fairly annoying issue.

Thanks!

cloudrootab avatar Jun 13 '22 14:06 cloudrootab

this is happening to me even though v3.0.20 is installed but winget says I have v3.0.19 installed.

kvxrun avatar Dec 08 '23 06:12 kvxrun

I only vaugely remember making this issue, but I think it was an issue with VLC, and the solution was to uninstall and reinstall VLC

Un1q32 avatar Dec 08 '23 06:12 Un1q32