Skip to content

Commit b1d340e

Browse files
committed
fix(api): only apply libc filter when caller pinned a meaningful libc
filterReleases unconditionally rejected libc=musl entries unless the host was libc=musl, even when the caller never specified a libc in the request. serve-releases.js defaults the libc parameter to 'libc' (the catch-all glibc-host bucket the installer-side resolver uses), so the website's release table and the WEBI_RELEASES probe were both stripped of every musl entry that the cache actually contained — even though the installer would happily consider those builds on a glibc host (its waterfall is [none, gnu, musl, libc]). Treat libc='libc' (and missing) as 'no preference' so the filter only runs when the caller pinned a real libc (musl, gnu, msvc, etc.). Specific-libc queries (?libc=musl, ?libc=gnu) still filter exactly as before.
1 parent 60757af commit b1d340e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

_webi/transform-releases.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ async function filterReleases(
110110
}
111111
}
112112

113-
if (rel.libc !== 'none') {
113+
// libc='libc' is serve-releases.js's default when the caller
114+
// didn't pin one — treat it as 'no preference', not a filter.
115+
let isMeaningfulLibc = libc && libc !== 'libc' && rel.libc !== 'none';
116+
if (isMeaningfulLibc) {
114117
let releaseRequiresMusl = rel.libc === 'musl';
115118
// goal: handle non-glibc (Alpine / Docker / musl)
116119
let osHasMusl = libc === 'musl';

0 commit comments

Comments
 (0)