adoptium / installer

Installer scripts for Eclipse Temurin binaries
Apache License 2.0
144 stars 71 forks source link

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

Open jxerome opened 1 year ago

jxerome commented 1 year ago

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, 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, 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.

chrassig commented 1 month 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

There is a corresponding issue in the winget-cli repository: https://github.com/microsoft/winget-cli/issues/2891