don't requeue package if it has already disabled LTO

This commit is contained in:
Giovanni Harting 2022-01-21 01:53:50 +01:00
parent 31af024b6a
commit e1df856398
1 changed files with 7 additions and 3 deletions

View File

@ -931,9 +931,13 @@ func logHK() error {
}
} else if reLdError.Match(logContent) {
log.Infof("[HK/%s/%s] fixable build-error detected (linker-error), requeueing package", pkg.March, pkg.Pkgbase)
err = db.DbPackage.Update().Where(dbpackage.And(dbpackage.Pkgbase(pkg.Pkgbase), dbpackage.March(pkg.March),
dbpackage.StatusEQ(dbpackage.StatusFailed))).ClearHash().SetStatus(dbpackage.StatusQueued).
SetLto(dbpackage.LtoAutoDisabled).Exec(context.Background())
err = db.DbPackage.Update().Where(
dbpackage.And(
dbpackage.Pkgbase(pkg.Pkgbase),
dbpackage.March(pkg.March),
dbpackage.StatusEQ(dbpackage.StatusFailed),
dbpackage.LtoNotIn(dbpackage.LtoAutoDisabled, dbpackage.LtoDisabled),
)).ClearHash().SetStatus(dbpackage.StatusQueued).SetLto(dbpackage.LtoAutoDisabled).Exec(context.Background())
if err != nil {
return err
}