WIP: pkgserver #33

Draft
maemachinebroke wants to merge 34 commits from maemachinebroke/hakurei:pkgserver into staging
Showing only changes of commit 55827f1a85 - Show all commits

View File

@@ -1,6 +1,7 @@
package main
import (
"errors"
"slices"
"strings"
"unique"
@@ -53,6 +54,12 @@ func (index *packageIndex) populate(cache *pkg.Cache, report *rosa.Report) (err
Metadata: rosa.GetMetadata(p),
Version: rosa.Std.Version(p),
}
if m.Version == "" {
return errors.New("invalid version from " + m.Name)
}
if m.Version == rosa.Unversioned {
m.Version = ""
}
if cache != nil && report != nil {
m.ident = cache.Ident(rosa.Std.Load(p))