combined error cases and added more
This commit is contained in:
15
main.go
15
main.go
@@ -168,19 +168,8 @@ func (b *BuildManager) buildWorker(id int, march string) {
|
||||
continue
|
||||
}
|
||||
|
||||
if reDepError.Match(out.Bytes()) {
|
||||
log.Infof("[%s/%s/%s] dep. 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
|
||||
}
|
||||
|
||||
if rePortError.Match(out.Bytes()) {
|
||||
log.Infof("[%s/%s/%s] port already used (firefox?) error detected, rebuilding later", pkg.FullRepo, pkg.Pkgbase, pkg.Version)
|
||||
if reDownloadError.Match(out.Bytes()) || rePortError.Match(out.Bytes()) || reSigError.Match(out.Bytes()) {
|
||||
log.Infof("[%s/%s/%s] detected fixable error, rebuilding later", pkg.FullRepo, pkg.Pkgbase, pkg.Version)
|
||||
pkg.DbPackage.Update().SetStatus(dbpackage.StatusQueued).ExecX(context.Background())
|
||||
err = cleanBuildDir(buildDir)
|
||||
if err != nil {
|
||||
|
17
utils.go
17
utils.go
@@ -40,14 +40,15 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
reMarch = regexp.MustCompile(`(-march=)(.+?) `)
|
||||
rePkgRel = regexp.MustCompile(`(?m)^pkgrel\s*=\s*(.+)$`)
|
||||
rePkgSource = regexp.MustCompile(`(?msU)^source.*=.*\((.+)\)$`)
|
||||
rePkgSum = regexp.MustCompile(`(?msU)^sha256sums.*=.*\((.+)\)$`)
|
||||
rePkgFile = regexp.MustCompile(`^(.+)(?:-.+){2}-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$`)
|
||||
reLdError = regexp.MustCompile(`(?mi).*collect2: error: ld returned (\d+) exit status.*`)
|
||||
reDepError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
||||
rePortError = regexp.MustCompile(`(?m)^OSError: \[Errno 98] Address already in use$`)
|
||||
reMarch = regexp.MustCompile(`(-march=)(.+?) `)
|
||||
rePkgRel = regexp.MustCompile(`(?m)^pkgrel\s*=\s*(.+)$`)
|
||||
rePkgSource = regexp.MustCompile(`(?msU)^source.*=.*\((.+)\)$`)
|
||||
rePkgSum = regexp.MustCompile(`(?msU)^sha256sums.*=.*\((.+)\)$`)
|
||||
rePkgFile = regexp.MustCompile(`^(.+)(?:-.+){2}-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$`)
|
||||
reLdError = regexp.MustCompile(`(?mi).*collect2: error: ld returned (\d+) exit status.*`)
|
||||
reDownloadError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
||||
rePortError = regexp.MustCompile(`(?m)^OSError: \[Errno 98] Address already in use$`)
|
||||
reSigError = regexp.MustCompile(`(?m)^error: .*: signature from .* is invalid$`)
|
||||
)
|
||||
|
||||
type BuildPackage struct {
|
||||
|
Reference in New Issue
Block a user