forked from ALHP/ALHP.GO
added workaround fpr firefox build using teh same port
This commit is contained in:
11
main.go
11
main.go
@@ -179,6 +179,17 @@ func (b *BuildManager) buildWorker(id int, march string) {
|
|||||||
continue
|
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())
|
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))
|
check(os.MkdirAll(filepath.Join(conf.Basedir.Repo, logDir, march), 0755))
|
||||||
|
1
utils.go
1
utils.go
@@ -47,6 +47,7 @@ var (
|
|||||||
rePkgFile = regexp.MustCompile(`^(.+)(?:-.+){2}-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$`)
|
rePkgFile = regexp.MustCompile(`^(.+)(?:-.+){2}-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$`)
|
||||||
reLdError = regexp.MustCompile(`(?mi).*collect2: error: ld returned (\d+) exit status.*`)
|
reLdError = regexp.MustCompile(`(?mi).*collect2: error: ld returned (\d+) exit status.*`)
|
||||||
reDepError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
reDepError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
||||||
|
rePortError = regexp.MustCompile(`(?m)^OSError: \[Errno 98] Address already in use$`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type BuildPackage struct {
|
type BuildPackage struct {
|
||||||
|
Reference in New Issue
Block a user