WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Fix failing WinGet publish action

Open mdanish-kh opened this issue 7 months ago • 4 comments

Summary of the Pull Request

WinGet publish action would fail previously because the base manifest at winget-pkgs didn't contain the MSIX installers, and wingetcreate expects the number of installers specified in the command to be the same as that in the latest manifest. The MSIX installers were added in the latest manifest in https://github.com/microsoft/winget-pkgs/pull/258400. Also, the MSIXBundle URL only needs to be specified once (not per architecture) as wingetcreate will parse all the architectures present within the bundle and create those nodes automatically. Specifying it multiple times will fail with an error.

Fixes the failing runs seen in https://github.com/microsoft/WSL/actions/workflows/winget.yml

Validation Steps Performed

To validate, you can run a wingetcreate command with old installer URLs and a dummy version (omitting the -s / --submit flag to prevent opening a PR like I did in examples below) to test the behavior

This command fails as it specifies the MSIXBundle URL multiple times with arch overrides

wingetcreate update Microsoft.WSL --version 10.0.0 --urls "https://github.com/microsoft/WSL/releases/download/2.5.4/wsl.2.5.4.0.x64.msi|x64" "https://github.com/microsoft/WSL/releases/download/2.5.4/wsl.2.5.4.0.arm64.msi|arm64" "https://github.com/microsoft/WSL/releases/download/2.5.4/Microsoft.WSL_2.5.4.0_x64_ARM64.msixbundle|x64" "https://github.com/microsoft/WSL/releases/download/2.5.4/Microsoft.WSL_2.5.4.0_x64_ARM64.msixbundle|arm64"

This command succeeds where MSIXBundle is only specified once

wingetcreate update Microsoft.WSL --version 10.0.0 --urls "https://github.com/microsoft/WSL/releases/download/2.5.4/wsl.2.5.4.0.x64.msi|x64" "https://github.com/microsoft/WSL/releases/download/2.5.4/wsl.2.5.4.0.arm64.msi|arm64" "https://github.com/microsoft/WSL/releases/download/2.5.4/Microsoft.WSL_2.5.4.0_x64_ARM64.msixbundle"

mdanish-kh avatar May 20 '25 19:05 mdanish-kh

I just made the change to remove the MSIX from our publish path and also opened a PR in winget-pkgs to remove all MSIX references there.

https://github.com/microsoft/winget-pkgs/pull/259199

I hope this should address it! @mdanish-kh what do you think?

craigloewen-msft avatar May 22 '25 17:05 craigloewen-msft

@craigloewen-msft Looks good if you only want the MSI installers available on WinGet. The change will work once you remove the MSIX from the latest version (https://github.com/microsoft/winget-pkgs/pull/259199#pullrequestreview-2862394692)

mdanish-kh avatar May 22 '25 19:05 mdanish-kh

@mdanish-kh

I'm going to merge this in

I've added 4 PRs to Winget to remove the MSIX.

https://github.com/microsoft/winget-pkgs/pull/259509 https://github.com/microsoft/winget-pkgs/pull/259510 https://github.com/microsoft/winget-pkgs/pull/259511 https://github.com/microsoft/winget-pkgs/pull/259512

craigloewen-msft avatar May 24 '25 00:05 craigloewen-msft

@benhillis I don't seem to have merging powers. This change looks good. Could you merge it for me?

craigloewen-msft avatar May 24 '25 00:05 craigloewen-msft

AFAIK WinGet doesn't support upgrading an MSIX package through a MSI installer. Removing the MSIX installer from the WinGet manifests may break upgrading. 🤔

SpecterShell avatar May 28 '25 15:05 SpecterShell