microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
505 stars 86 forks source link

The number of new installer packages must match the number of existing installer packages #559

Open nebula-it opened 1 week ago

nebula-it commented 1 week ago

Brief description of your issue

wingetcreate.exe fails to update manifest

Steps to reproduce

Run wingetcreate.exe update Cilium.CiliumCLI -s -v 0.16.20 -u https://github.com/cilium/cilium-cli/releases/download/v0.16.20/cilium-windows-amd64.zip https://github.com/cilium/cilium-cli/releases/download/v0.16.20/cilium-windows-arm64.zip -t $($env:WINGET_PAT)

Expected behavior

Should have updated the manifest with new version and submitted the PR

Actual behavior

Failed to update manifest with error:

Retrieving latest manifest for Cilium.CiliumCLI
Downloading and parsing: https://github.com/cilium/cilium-cli/releases/download/v0.16.20/cilium-windows-amd64.zip...
Downloading and parsing: https://github.com/cilium/cilium-cli/releases/download/v0.16.20/cilium-windows-arm64.zip...
The number of new installer packages must match the number of existing installer packages.

Even though the number of packages is same as what is currently in https://github.com/microsoft/winget-pkgs/blob/master/manifests/c/Cilium/Hubble/1.16.3/Cilium.Hubble.installer.yaml

I believe this might be due to different number of installers in an older version: https://github.com/microsoft/winget-pkgs/blob/master/manifests/c/Cilium/Hubble/0.12.0/Cilium.Hubble.installer.yaml

Environment

Used in Github actions, winget-create is retreived using Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe

similar-issues-ai[bot] commented 1 week ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

mdanish-kh commented 1 week ago

This is because the existing manifest is incorrect. It should specify InstallerType: zip instead of InstallerType: portable & use NestedInstallerType: portable & specify the NestedInstallerFiles.

I've opened a PR for the necessary changes here:

Once that's merged, wingetcreate should be able to update the manifest normally.

nebula-it commented 1 week ago

Ah..perfect. Thank you for creating that PR. I'll get this fixed on https://github.com/microsoft/winget-pkgs/blob/master/manifests/c/Cilium/Hubble/1.16.3/Cilium.Hubble.installer.yaml as well