Files
AJ ONeal c3fff12f2b fix(ollama): fix macOS segfault and exclude mlx/rocm/jetpack variants
- pkg_link called webi_link which called pkg_link — infinite recursion
  causing SIGSEGV on macOS; fixed by switching to WEBI_SINGLE-style paths
  so the template's webi_link handles symlinking directly
- macOS pkg_src now points to the flat ollama binary (not ./bin/ollama)
- mlx, rocm, jetpack5, jetpack6 tagged as variants so generic installs
  get the standard build instead of a GPU-specific one
2026-05-18 00:31:41 -06:00

26 lines
831 B
Go

// Package ollama provides variant tagging for Ollama releases.
package ollamadist
import (
"strings"
"github.com/webinstall/webi-installers/internal/storage"
)
// TagVariants tags ollama-specific build variants.
// Suffix variants (mlx, rocm, jetpack5, jetpack6) are handled by the
// conf-driven loop in classifypkg.TagVariants; this handles the rest.
func TagVariants(assets []storage.Asset) {
for i := range assets {
// Ollama-darwin.zip (capital O) is the macOS .app bundle.
// Installable by Go (extract .app), but not in legacy cache.
if strings.HasPrefix(assets[i].Filename, "Ollama-") {
assets[i].Variants = append(assets[i].Variants, "app")
}
// ollama-darwin is a universal2 fat binary (arm64 + amd64).
if assets[i].OS == "darwin" && assets[i].Arch == "" {
assets[i].Arch = "universal2"
}
}
}