mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-17 06:06:35 +00:00
In _enumerateTriplets, the order of `oses` and `arches` was ANYOS/ANYARCH first, specific second. This caused findMatchingPackages to pick the most-generic triplet (e.g. ANYOS-ANYARCH-none) before trying specific OS triplets — and packages that have a wildcard git fallback alongside per-platform binaries would resolve to the git source instead of the binary, even when the client never asked for git as an unpacker. Reverse the order so specific platforms win: - oses: hostTarget.os, posix_2017, posix_2024, ANYOS - arches: arches.concat(['ANYARCH']) Concrete example: serviceman has both posix_2017/*/tar.gz and */*/git in the cache. Pre-fix, findMatchingPackages picks ANYOS-ANYARCH-none (containing only the .git entry). The .git gate in getSortedFormats then correctly excludes git from format candidates, but the chosen triplet has nothing else, so selectPackage falls through to packages[0] = git entry. Post-fix, findMatchingPackages picks posix_2017-ANYARCH-none first (containing [tar.gz, zip]), and selectPackage returns tar.gz.