forked from ALHP/ALHP.GO
added detection for error 404 dependency not found on mirror
This commit is contained in:
@@ -234,9 +234,10 @@ func logHK() error {
|
|||||||
}
|
}
|
||||||
sLogContent := string(logContent)
|
sLogContent := string(logContent)
|
||||||
|
|
||||||
if rePortError.MatchString(sLogContent) || reSigError.MatchString(sLogContent) || reDownloadError.MatchString(sLogContent) {
|
if rePortError.MatchString(sLogContent) || reSigError.MatchString(sLogContent) || reDownloadError.MatchString(sLogContent) ||
|
||||||
rows, err := db.DBPackage.Update().Where(dbpackage.And(dbpackage.Pkgbase(pkg.Pkgbase), dbpackage.March(pkg.March),
|
reDownloadError2.MatchString(sLogContent) {
|
||||||
dbpackage.StatusEQ(dbpackage.StatusFailed))).ClearTagRev().SetStatus(dbpackage.StatusQueued).Save(context.Background())
|
rows, err := db.DBPackage.Update().Where(dbpackage.Pkgbase(pkg.Pkgbase), dbpackage.March(pkg.March),
|
||||||
|
dbpackage.StatusEQ(dbpackage.StatusFailed)).ClearTagRev().SetStatus(dbpackage.StatusQueued).Save(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@@ -223,7 +223,8 @@ func (p *ProtoPackage) build(ctx context.Context) (time.Duration, error) {
|
|||||||
return time.Since(start), fmt.Errorf("ld/lto-incomp error detected, LTO disabled")
|
return time.Since(start), fmt.Errorf("ld/lto-incomp error detected, LTO disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
if reDownloadError.MatchString(out.String()) || rePortError.MatchString(out.String()) || reSigError.MatchString(out.String()) {
|
if reDownloadError.MatchString(out.String()) || reDownloadError2.MatchString(out.String()) ||
|
||||||
|
rePortError.MatchString(out.String()) || reSigError.MatchString(out.String()) {
|
||||||
p.DBPackage.Update().SetStatus(dbpackage.StatusQueued).ExecX(ctx)
|
p.DBPackage.Update().SetStatus(dbpackage.StatusQueued).ExecX(ctx)
|
||||||
return time.Since(start), fmt.Errorf("known builderror detected")
|
return time.Since(start), fmt.Errorf("known builderror detected")
|
||||||
}
|
}
|
||||||
|
1
utils.go
1
utils.go
@@ -42,6 +42,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.*`)
|
||||||
reDownloadError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
reDownloadError = regexp.MustCompile(`(?m)^error: could not rename .+$`)
|
||||||
|
reDownloadError2 = regexp.MustCompile(`(?m)^error: failed retrieving file '.+' from .*: The requested URL returned error: .+$`)
|
||||||
rePortError = regexp.MustCompile(`(?m)^OSError: \x5bErrno 98\x5d Address already in use$`)
|
rePortError = regexp.MustCompile(`(?m)^OSError: \x5bErrno 98\x5d Address already in use$`)
|
||||||
reSigError = regexp.MustCompile(`(?m)^error: .*: signature from .* is invalid$`)
|
reSigError = regexp.MustCompile(`(?m)^error: .*: signature from .* is invalid$`)
|
||||||
reRustLTOError = regexp.MustCompile(`(?m)^error: options \x60-C (.+)\x60 and \x60-C lto\x60 are incompatible$`)
|
reRustLTOError = regexp.MustCompile(`(?m)^error: options \x60-C (.+)\x60 and \x60-C lto\x60 are incompatible$`)
|
||||||
|
Reference in New Issue
Block a user