try loading package from database first

This commit is contained in:
Giovanni Harting 2023-05-23 20:23:02 +02:00
parent be85bc0f5a
commit e8e6b44ad1

View File

@ -588,15 +588,23 @@ func (b *BuildManager) genQueue() ([]*ProtoPackage, error) {
Arch: arch,
}
err = pkg.toDBPackage(false)
if err != nil {
log.Warningf("[QG] error getting/creating dbpackage %s: %v", state.Pkgbase, err)
continue
}
if !pkg.isAvailable(alpmHandle) {
log.Debugf("[QG] %s->%s not available on mirror, skipping build", pkg.FullRepo, pkg.Pkgbase)
continue
}
err = pkg.toDBPackage(true)
if err != nil {
log.Warningf("[QG] error getting/creating dbpackage %s: %v", state.Pkgbase, err)
continue
if pkg.DBPackage == nil {
err = pkg.toDBPackage(true)
if err != nil {
log.Warningf("[QG] error getting/creating dbpackage %s: %v", state.Pkgbase, err)
continue
}
}
if !pkg.isEligible(context.Background()) {