mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-17 06:06:35 +00:00
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.
This commit is contained in:
@@ -112,7 +112,10 @@ async function filterReleases(
|
||||
}
|
||||
}
|
||||
|
||||
if (rel.libc !== 'none') {
|
||||
// libc='libc' is serve-releases.js's default when the caller
|
||||
// didn't pin one — treat it as 'no preference', not a filter.
|
||||
let isMeaningfulLibc = libc && libc !== 'libc' && rel.libc !== 'none';
|
||||
if (isMeaningfulLibc) {
|
||||
let releaseRequiresMusl = rel.libc === 'musl';
|
||||
// goal: handle non-glibc (Alpine / Docker / musl)
|
||||
let osHasMusl = libc === 'musl';
|
||||
|
||||
Reference in New Issue
Block a user