fix(mariadb): skip source tarballs with OS="Source" or whitespace CPU

The MariaDB API returns OS="Source" and CPU=" " for source packages.
The previous check only tested for empty strings, missing these.
This commit is contained in:
AJ ONeal
2026-03-10 17:44:26 -06:00
parent 2b0b293728
commit 72a8c56b13

View File

@@ -1357,8 +1357,9 @@ func classifyMariaDBDist(d *rawcache.Dir) ([]storage.Asset, error) {
lts := rel.MajorStatus == "Stable"
for _, f := range rel.Files {
// Skip source packages (no OS or CPU).
if f.OS == "" || f.CPU == "" {
// Skip source packages. The API uses OS="Source" and
// sometimes " " (not empty) for CPU on source tarballs.
if strings.EqualFold(f.OS, "source") || strings.TrimSpace(f.OS) == "" || strings.TrimSpace(f.CPU) == "" {
continue
}
// Skip debug builds.