microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.07k stars 1.43k forks source link

Winget refuses to update packages, ignoring --all as well #2891

Open ToothyDev opened 1 year ago

ToothyDev commented 1 year ago

Brief description of your issue

So for starters I am on v1.4.10173 I did winget upgrade today to see if there were any updates needed, and sure enough, both my java JREs needed upgrading. Then, I ran winget upgrade --all, and to my surprise it started updating the terminal. It did not, however, update the JREs. Running winget upgrade --all just returns the 2 updatable java JREs, while also saying that 26 packages have undeterminable version numbers (I have f.lux, which doesnt properly display its version number, the issue with the apparent random number of undeterminable packages only started recently.) Including --include-unknown will also only list f.lux Anyway, next I copied the exact ID winget told me for updating (winget upgrade EclipseAdoptium.Temurin.17.JRE), however it says "No applicable upgrade found." despite saying that there is a newer version. Screenshots below image image image image image

Steps to reproduce

  1. Have a package that needs updating
  2. Run winget upgrade --all, or any other command to update any of your packages that need updates
  3. See it not work, and just return the number of packages in need of upgrades

Expected behavior

--all just automatically updates all packages like it did before When it says 26 packages have undeterminable version numbers, I expect --include-unknown to also show those 26, if they even exist (I doubt it) Updating should work at all (shrug)

Actual behavior

Nothing of the above works at all

Environment

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

Windows: Windows.Desktop v10.0.22621.1105
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0
Trenly commented 1 year ago

Can you post the logs from winget upgrade EclipseAdoptium.Temurin.17.JRE --verbose-logs?

Also, what is the output of winget list Temurin?

ToothyDev commented 1 year ago

That first command does nothing because it still says no applicable upgrade found

image

Trenly commented 1 year ago

That first command does nothing because it still says no applicable upgrade found

image

Although it may appear to do nothing, it still should have created logs. The location of the log files can be found with winget --info

ToothyDev commented 1 year ago

WinGet-2023-01-29-01-27-12.622.log

Trenly commented 1 year ago

WinGet-2023-01-29-01-27-12.622.log

Looks like you have a preferred locale set which may be preventing the install?

2023-01-29 01:27:16.392 [CLI ] Starting installer selection.
2023-01-29 01:27:16.392 [CLI ] Installer [X86,wix,Unknown,en-US] not applicable: Installer locale does not match required locale: en-USRequired locales: [] Or does not satisfy compatible match for Preferred Locales: [de-DE]
2023-01-29 01:27:16.392 [CLI ] Installer [X64,wix,Unknown,en-US] not applicable: Installer locale does not match required locale: en-USRequired locales: [] Or does not satisfy compatible match for Preferred Locales: [de-DE]
ToothyDev commented 1 year ago

My Windows display language is English, and I don't know why a locale issue would prevent it from just updating java. Java did default to the windows install language which is German, I can't change that, and if this really is the reason winget won't update then that's kind of bad

jxerome commented 1 year ago

I meet exactly the same problem with a fr-FR os locale. But it should not be a reason not to upgrade the package.

2023-02-08 16:53:53.442 [CLI ] Starting installer selection.
2023-02-08 16:53:53.442 [CLI ] Installer [X86,wix,Unknown,en-US] not applicable: Installer locale does not match required locale: en-USRequired locales: [] Or does not satisfy compatible match for Preferred Locales: [fr-FR]
2023-02-08 16:53:53.442 [CLI ] Installer [X64,wix,Unknown,en-US] not applicable: Installer locale does not match required locale: en-USRequired locales: [] Or does not satisfy compatible match for Preferred Locales: [fr-FR]
crrodriguez commented 1 year ago

Same with locale es-CL..not sure why one should care what locale the installer supports as long as it upgrades the software correctly.

markusdd commented 1 year ago

For me an update is advertised, but then logs say that no applicable upgrade was found. weird. grafik grafik

Mat2095 commented 7 months ago

I'm facing the same issue, winget won't let me upgrade EclipseAdoptium.Temurin.17.JRE 17.0.9.9 to 17.0.10.7. Two things I've noticed:

chrassig commented 4 months ago

I was able to manually upgrade Temurin using winget by passing en-US using the locale parameter:

winget install EclipseAdoptium.Temurin.21.JDK --locale en-US

DRSchlaubi commented 3 months ago

Same with locale es-CL..not sure why one should care what locale the installer supports as long as it upgrades the software correctly.

Since the winget devs probably had some reason for this, I would be very interested to know what it was, since I can't think of one as well

Maybe they wanted the UI of the installer to have the same language, but Temurin doesn't even seem to present a UI in silent mode, so I don't really get why that is

Masamune3210 commented 3 months ago

It does matching because the locale of the installer tends to correlate with the locale of the installed product. It wouldn't be much use to upgrade someone's Spanish locale version of a program to an English one if they didn't speak English, for example

Mat2095 commented 3 months ago

But it would be good if an English version of a program could be upgraded to a higher English version on a machine set to French. It doesn't seem to be a problem when installing, only upgrading.