added availability check before package is created in database

This commit is contained in:
Giovanni Harting 2023-05-23 18:36:04 +02:00
parent 9e29310af6
commit d1725d7bcd

View File

@ -588,6 +588,11 @@ func (b *BuildManager) genQueue() ([]*ProtoPackage, error) {
Arch: arch,
}
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)