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

Sometimes some upgrades were not seen by the tool

Open alkampfergit opened this issue 3 years ago • 7 comments

Brief description of your issue

I issue a winget upgrade to look for packages to upgrade, it list some packages, but sometimes when you ask for upgrade the upgrade was not found. Look at the image below.

image

Steps to reproduce

It is difficult, we have no real steps to reproduce.

Expected behavior

If winget upgrade list me that package Git.Git has an upgrade, I'm expecting to upgrade with

winget upgrade Git.Git

Actual behavior

It tells me that there is no upgrade.

Environment

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

Windows: Windows.Desktop v10.0.19044.1766
Package: Microsoft.DesktopAppInstaller v1.17.11601.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

alkampfergit avatar Jun 28 '22 07:06 alkampfergit

@alkampfergit

Do you know if the previous installation was user based or machine based? I'd like to get a bit more detail if possible. Could you run the commands with "--verbose-logs" and attach them to the issue? I'm also wondering if the same thing happens with the 1.3 release candidate build.

denelon avatar Jun 28 '22 18:06 denelon

I can confirm this happens if you have Git installed without admin rights. It's a little bit of a pain to reproduce though (if you are in the Administrators group, Git pops up a UAC prompt which you have to accept or it closes the installer. To make it work, you have to not be an administrator and run the installer). This is probably why we don't have a user-scoped installer for Git, even though it installs user-scoped, someone should probably ask them nicely to allow you to install it into AppData even if you're an admin.

--verbose-logs attached, using the 1.3 release candidate: DiagOutputDir.zip

jedieaston avatar Jun 29 '22 20:06 jedieaston

@jedieaston

Do you think the changes made for EdgeWebView2 would help here as well?

denelon avatar Jun 29 '22 22:06 denelon

I believe it would fix the upgrade scenario, but installs with —scope user would still install system wide if the user had admin rights. If you think that’s acceptable I can open a PR.

jedieaston avatar Jun 30 '22 00:06 jedieaston

I believe this at least would be an incremental improvement for the upgrade scenario. At this point, we are performing more upgrade actions than install actions on average.

denelon avatar Jun 30 '22 15:06 denelon

Actually I've manually upgraded Git tool so I have no upgrade available to retry.

My user is not in the Administrators group, this is a thing that makes winget suffer. Actually other packages prompt for an administrator, I enter credentials of adminsitrator user and everything is ok, but git upgrade seems not to be found. When another git upgrade will be available I'll try with verbose both with my standard user and with the administrator user.

alkampfergit avatar Jul 01 '22 09:07 alkampfergit

@denelon That seems to have mitigated it, at least for the "upgrade if I installed it as a standard user" scenario:

image

jedieaston avatar Jul 01 '22 17:07 jedieaston