From 72a8c56b1313525d4ce1eb62193bf5029fca87fb Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 10 Mar 2026 17:44:26 -0600 Subject: [PATCH] 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. --- cmd/webicached/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/webicached/main.go b/cmd/webicached/main.go index 288fe04..b1147fa 100644 --- a/cmd/webicached/main.go +++ b/cmd/webicached/main.go @@ -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.