This commit is contained in:
ferreo 2024-08-02 21:35:32 +01:00
parent 8e5303ed7a
commit e5b039b3c9
4 changed files with 11 additions and 5 deletions

View File

@ -111,7 +111,7 @@ func loadConfig() error {
return err return err
} }
Configs.I386List, err = loadI386List() config.I386List, err = loadI386List()
if err != nil { if err != nil {
return err return err
} }

View File

@ -22,8 +22,8 @@ type SourcePackage struct {
} }
type SourcePackageDTO struct { type SourcePackageDTO struct {
Name string `gorm:"primarykey"` Name string `gorm:"primarykey"`
Has32bit bool
Packages []PackageInfo `gorm:"foreignKey:PackageName"` Packages []PackageInfo `gorm:"foreignKey:PackageName"`
} }

View File

@ -90,17 +90,23 @@ func ProcessPackages() error {
updatedPackages.ForEach(func(k string, v domain.SourcePackage) bool { updatedPackages.ForEach(func(k string, v domain.SourcePackage) bool {
for _, pkg := range config.Configs.I386List { for _, pkg := range config.Configs.I386List {
if v.Name == pkg { if v.Name == pkg || v.Name == pkg+"-dmo" {
v.Has32bit = true v.Has32bit = true
updatedPackages.Set(k, v)
return true return true
} }
} }
v.Has32bit = false v.Has32bit = false
updatedPackages.Set(k, v)
return true return true
}) })
for _, pkg := range config.Configs.I386List { for _, pkg := range config.Configs.I386List {
if _, ok := updatedPackages.Get(pkg); !ok { if _, ok := updatedPackages.Get(pkg); !ok {
_, ok := updatedPackages.Get(pkg + "-dmo")
if ok {
continue
}
updatedPackages.Set(pkg, domain.SourcePackage{ updatedPackages.Set(pkg, domain.SourcePackage{
Name: pkg, Name: pkg,
Has32bit: true, Has32bit: true,

View File

@ -55,7 +55,7 @@ func runServer(ctx context.Context) error {
slog.Info("packages loaded in " + time.Since(start).String()) slog.Info("packages loaded in " + time.Since(start).String())
buildqueue.StartPackageQueueWorker(ctx) buildqueue.StartPackageQueueWorker(ctx)
buildqueue.StartQueueAndStatusWorker(ctx) // buildqueue.StartQueueAndStatusWorker(ctx)
cfg := fiber.Config{ cfg := fiber.Config{
JSONEncoder: json.Marshal, JSONEncoder: json.Marshal,