added workaround fpr firefox build using teh same port

This commit is contained in:
2021-12-19 17:39:33 +01:00
parent 3a6e4be5cf
commit fdde0386ec
2 changed files with 12 additions and 0 deletions

11
main.go
View File

@@ -179,6 +179,17 @@ func (b *BuildManager) buildWorker(id int, march string) {
continue
}
if rePortError.Match(out.Bytes()) {
log.Infof("[%s/%s/%s] port already used (firefox?) error detected, rebuilding later", pkg.FullRepo, pkg.Pkgbase, pkg.Version)
pkg.DbPackage.Update().SetStatus(dbpackage.StatusQueued).ExecX(context.Background())
err = cleanBuildDir(buildDir)
if err != nil {
log.Warningf("[%s/%s/%s] Error removing builddir: %v", pkg.FullRepo, pkg.Pkgbase, pkg.Version, err)
}
b.buildWG.Done()
continue
}
log.Warningf("[%s/%s/%s] Build failed (%d)", pkg.FullRepo, pkg.Pkgbase, pkg.Version, cmd.ProcessState.ExitCode())
check(os.MkdirAll(filepath.Join(conf.Basedir.Repo, logDir, march), 0755))