adoptium / adoptium/installer

Upgrade on Windows with winget fails if machine locale is not english

Open
#610 1 comment 1 reaction 0 assignees View on GitHub
bug wix
Dominant language
Jinja
Stars
168
Forks
77
Avg merge
2d 14h
Merged PRs (30d)
12

Description

Last versions upgrade fails on Windows if locale is not en-US.

I have the package to upgrade.
```
❯ winget upgrade
Nom ID Version Disponible Source
-----------------------------------------------------------------------------------------------------------
Eclipse Temurin JDK avec Hotspot 11.0.17+8 (x64) EclipseAdoptium.Temurin.11.JDK 11.0.17.8 11.0.18.10 winget
Eclipse Temurin JDK avec Hotspot 8u352-b08 (x64) EclipseAdoptium.Temurin.8.JDK 8.0.352.8 8.0.362.9 winget
Eclipse Temurin JDK avec Hotspot 17.0.5+8 (x64) EclipseAdoptium.Temurin.17.JDK 17.0.5.8 17.0.6.10 winget
3 mises à niveau disponibles.
```

If I try to upgrade one of them, nothing happens.

```
❯ winget upgrade EclipseAdoptium.Temurin.17.JDK
Aucune mise à niveau applicable trouvée. (Translation: No applicable upgrade available.)
```

In the installation log file [upgrade_WinGet-2023-02-08-17-24-36.776.log](https://github.com/adoptium/installer/files/10687870/upgrade_WinGet-2023-02-08-17-24-36.776.log), I get the following lines:

```
2023-02-08 17:24:38.536 [CLI ] Starting installer selection.
2023-02-08 17:24:38.536 [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 17:24:38.536 [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]
```

If I try to uninstall and reinstall the package, the old version is installed.
At some time it says that a package was already installed which is not true. The uninstall actually removed the installation folder.

```
❯ winget uninstall EclipseAdoptium.Temurin.17.JDK
Trouvé Eclipse Temurin JDK with Hotspot 17 [EclipseAdoptium.Temurin.17.JDK]
Début de la désinstallation du paquet...
Désinstallé avec succès (Translation: Uninstall succeeded)

❯ winget install EclipseAdoptium.Temurin.17.JDK
Un package existant a déjà été installé. Tentative de mise à niveau du package installé... (Translation: A package was already installed. Try to upgrade it)
Trouvé Eclipse Temurin JDK with Hotspot 17 [EclipseAdoptium.Temurin.17.JDK] Version 17.0.5.8
La licence d’utilisation de cette application vous est octroyée par son propriétaire.
Microsoft n’est pas responsable des paquets tiers et n’accorde pas de licences à ceux-ci.
Téléchargement en cours https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.5%2B8/OpenJDK17U-jdk_x64_windows_hotspot_17.0.5_8.msi
██████████████████████████████ 160 MB / 160 MB
Le code de hachage de l’installation a été vérifié avec succès
Démarrage du package d’installation... Merci de patienter.
Installé correctement (Translation: Install completed)
```

The logs [installation_WinGet-2023-02-08-17-25-22.390.log](https://github.com/adoptium/installer/files/10687939/installation_WinGet-2023-02-08-17-25-22.390.log), show the lines:

```
2023-02-08 17:25:23.543 [CLI ] Found one app. App id: EclipseAdoptium.Temurin.17.JDK App name: Eclipse Temurin JDK with Hotspot 17
2023-02-08 17:25:23.543 [CLI ] Found installed package, converting to upgrade flow
2023-02-08 17:25:23.552 [REPO] Downloading manifest
2023-02-08 17:25:23.552 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/e/EclipseAdoptium/Temurin/17/JDK/17.0.6.10/6afc-EclipseAdoptium.Temurin.17.JDK.yaml
2023-02-08 17:25:23.566 [CORE] Download hash: 8601ece8ca086d64f0fd32abc6ca6d9a9f81523a927a55d71d15d3baf4df68a1
2023-02-08 17:25:23.566 [CORE] Download completed.
2023-02-08 17:25:23.567 [CLI ] Starting installer selection.
2023-02-08 17:25:23.567 [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 17:25:23.567 [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]
2023-02-08 17:25:23.569 [REPO] Downloading manifest
2023-02-08 17:25:23.569 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/e/EclipseAdoptium/Temurin/17/JDK/17.0.5.8/c535-EclipseAdoptium.Temurin.17.JDK.yaml
2023-02-08 17:25:24.159 [CORE] Download hash: 28866e47372ef0dd3d7ff07ed68d4086e4d17f394a1acb7fd9fda37056e9188a
2023-02-08 17:25:24.159 [CORE] Download completed.
2023-02-08 17:25:24.162 [CLI ] Starting installer selection.
2023-02-08 17:25:24.162 [CLI ] Completed installer selection.
2023-02-08 17:25:24.163 [CLI ] Manifest fields: Name [Eclipse Temurin JDK with Hotspot 17], Version [17.0.5.8]
[...]
```

Previous versions were installed without any specific notice.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the upgrade and reinstall commands with a non-en-US Windows locale, then inspect the linked upgrade and installation logs alongside the Winget YAML manifests. Done means the current package version can be selected and upgraded, rather than falling back to the older version, when the machine locale is fr-FR.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
operating-systems, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.