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 "A newer package version is available in a configured source, but it does not apply to your system or requirements." tries to install wrong package #217693

Open
Haraldi-Coding opened this issue Jan 25, 2025 · 2 comments
Labels
Help-Wanted This is a good candidate work item from the community. Package-Update This package needs to be updated

Comments

@Haraldi-Coding
Copy link

Haraldi-Coding commented Jan 25, 2025

Brief description of your issue

Trying to upgrade Microsoft.OpenJDK.17 from installed version 17.0.13.11 to 17.0.14.7 failed. It looks like that winget tries to install for DE-DE (that's correct, there I am working from, but OS is EN-US) the ARM package instead of the (also available) x64 package. Details and log excerpt below.

Steps to reproduce

Hi,

winget list --upgrade-available --source=winget

Name                                         Id                       Version       Available
-------------------------------------------------------------------------------------------------
Microsoft Build of OpenJDK  17.0.13+11 (x64) Microsoft.OpenJDK.17     17.0.13.11    17.0.14.7

winget upgrade Microsoft.OpenJDK.17 --verbose-logs

No applicable upgrade found.
A newer package version is available in a configured source, but it does not apply to your system or requirements.

Log:

2025-01-25 20:57:43.050 [CLI ] Search result size: 1
2025-01-25 20:57:43.050 [CLI ] Found one app. App id: Microsoft.OpenJDK.17 App name: Microsoft Build of OpenJDK with Hotspot 17
2025-01-25 20:57:43.051 [CLI ] Market Filter created with market: DE
2025-01-25 20:57:43.051 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [de-DE] , IsInstalledLocale: 1
2025-01-25 20:57:43.051 [CLI ] Architecture Comparator created with allowed architectures: [X64, X86, Neutral]
2025-01-25 20:57:43.054 [REPO] Attempting to open pinning database: C:\Users\HaraldvonAschen\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2025-01-25 20:57:43.054 [REPO] ... opening existing pinning database
2025-01-25 20:57:43.054 [REPO] Opening database for Read at 'C:\Users\HaraldvonAschen\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2025-01-25 20:57:43.054 [REPO] Opened Pinning Index with version [1.0], last write [2023-07-17 08:25:34.000]
2025-01-25 20:57:43.054 [REPO] Did not find pin Package=[ARP\Machine\X64\{879C3E29-AA5D-4009-B30D-7F4C8EC13044}] Source=[*PredefinedInstalledSource]
2025-01-25 20:57:43.054 [CLI ] Updating from [17.0.13.11] to [17.0.14.7]
2025-01-25 20:57:43.055 [REPO] Did not find pin Package=[Microsoft.OpenJDK.17] Source=[Microsoft.Winget.Source_8wekyb3d8bbwe]
2025-01-25 20:57:43.055 [CORE] Reading cached file [C:\Users\HARALD~1\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/m/Microsoft/OpenJDK/17/17.0.14.7/72f3]
2025-01-25 20:57:43.062 [YAML] Detected UTF-8
2025-01-25 20:57:43.064 [CLI ] Starting installer selection.
2025-01-25 20:57:43.064 [CLI ] Installer [X64,wix,Machine,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]
2025-01-25 20:57:43.064 [CLI ] Installer [Arm64,wix,Machine,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]
2025-01-25 20:57:43.064 [CLI ] Installer [Arm64,wix,Machine,en-US] not applicable: Machine is not compatible with Arm64
2025-01-25 20:57:43.069 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:be

Web page Microsoft:
https://learn.microsoft.com/en-us/java/openjdk/download

Here you can check that there is of course a x64 package available:

Image

No clue why winget tries to install on an x64 machine with an already installed x64 package an ARM version and saying that the locale is not correct?

Expected behavior

Winget installs the correct binary for the current OS with the OS localization.

Actual behavior

Winget tries to install the ARM binaries.

Environment

`winget --info`

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

Windows: Windows.Desktop v10.0.22631.4751
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0



Processor	Intel(R) Xeon(R) W-11955M CPU @ 2.60GHz   2.61 GHz
System type	64-bit operating system, x64-based processor
Edition	Windows 11 Enterprise
Version	23H2
Installed on	‎07.‎10.‎2022
OS build	22631.4751
Experience	Windows Feature Experience Pack 1000.22700.1055.0
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Jan 25, 2025
@MagicAndre1981
Copy link

New manifest has Installer-Locale entry which the old manifest doesn't have and likely triggers the issue.

@denelon denelon transferred this issue from microsoft/winget-cli Jan 27, 2025
@stephengillie stephengillie added Help-Wanted This is a good candidate work item from the community. Package-Update This package needs to be updated and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels Jan 28, 2025
@MagicAndre1981
Copy link

Same applies to Microsoft.OpenJDK.11, here the locale also prevents update:

2025-02-09 12:15:07.896 [REPO] Did not find pin Package=[Microsoft.OpenJDK.11] Source=[Microsoft.Winget.Source_8wekyb3d8bbwe]
2025-02-09 12:15:07.896 [CORE] Reading cached file [C:\Users\ANDR~1\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/m/Microsoft/OpenJDK/11/11.0.26.4/67fb]
2025-02-09 12:15:07.908 [YAML] Detected UTF-8
2025-02-09 12:15:07.910 [CLI ] Starting installer selection.
2025-02-09 12:15:07.910 [CLI ] Installer [X64,wix,Machine,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]
2025-02-09 12:15:07.910 [CLI ] Installer [Arm64,wix,Machine,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]
2025-02-09 12:15:07.910 [CLI ] Installer [Arm64,wix,Machine,en-US] not applicable: Machine is not compatible with Arm64
2025-02-09 12:15:07.918 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help-Wanted This is a good candidate work item from the community. Package-Update This package needs to be updated
Projects
None yet
Development

No branches or pull requests

3 participants