forked from ALHP/ALHP.GO
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if reDepError.Match(out.Bytes()) {
|
if reDownloadError.Match(out.Bytes()) || rePortError.Match(out.Bytes()) || reSigError.Match(out.Bytes()) {
|
||||||
log.Infof("[%s/%s/%s] dep. error detected, rebuilding later", pkg.FullRepo, pkg.Pkgbase, pkg.Version)
|
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 {
|
|
||||||
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)
|
|
||||||
pkg.DbPackage.Update().SetStatus(dbpackage.StatusQueued).ExecX(context.Background())
|
pkg.DbPackage.Update().SetStatus(dbpackage.StatusQueued).ExecX(context.Background())
|
||||||
err = cleanBuildDir(buildDir)
|
err = cleanBuildDir(buildDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
3
utils.go
3
utils.go
@@ -46,8 +46,9 @@ var (
|
|||||||
rePkgSum = regexp.MustCompile(`(?msU)^sha256sums.*=.*\((.+)\)$`)
|
rePkgSum = regexp.MustCompile(`(?msU)^sha256sums.*=.*\((.+)\)$`)
|
||||||
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 .+$`)
|
reDownloadError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
||||||
rePortError = regexp.MustCompile(`(?m)^OSError: \[Errno 98] Address already in use$`)
|
rePortError = regexp.MustCompile(`(?m)^OSError: \[Errno 98] Address already in use$`)
|
||||||
|
reSigError = regexp.MustCompile(`(?m)^error: .*: signature from .* is invalid$`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type BuildPackage struct {
|
type BuildPackage struct {
|
||||||
|
Reference in New Issue
Block a user