forked from ALHP/ALHP.GO
added regex to match "options -C embed-bitcode=no and -C lto are incompatible"
This commit is contained in:
@@ -239,9 +239,9 @@ func (p *ProtoPackage) build(ctx context.Context) (time.Duration, error) {
|
|||||||
return time.Since(start), ctx.Err()
|
return time.Since(start), ctx.Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.DbPackage.Lto != dbpackage.LtoAutoDisabled && p.DbPackage.Lto != dbpackage.LtoDisabled && reLdError.Match(out.Bytes()) {
|
if p.DbPackage.Lto != dbpackage.LtoAutoDisabled && p.DbPackage.Lto != dbpackage.LtoDisabled && (reLdError.MatchString(out.String()) || reRustLTOError.MatchString(out.String())) {
|
||||||
p.DbPackage.Update().SetStatus(dbpackage.StatusQueued).SetSkipReason("non-LTO rebuild").SetLto(dbpackage.LtoAutoDisabled).ExecX(ctx)
|
p.DbPackage.Update().SetStatus(dbpackage.StatusQueued).SetSkipReason("non-LTO rebuild").SetLto(dbpackage.LtoAutoDisabled).ExecX(ctx)
|
||||||
return time.Since(start), fmt.Errorf("ld 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()) || rePortError.MatchString(out.String()) || reSigError.MatchString(out.String()) {
|
||||||
|
6
utils.go
6
utils.go
@@ -54,6 +54,7 @@ var (
|
|||||||
reDownloadError = 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$`)
|
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$`)
|
||||||
)
|
)
|
||||||
|
|
||||||
type BuildManager struct {
|
type BuildManager struct {
|
||||||
@@ -696,8 +697,9 @@ func logHK() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
sLogContent := string(logContent)
|
||||||
|
|
||||||
if rePortError.Match(logContent) || reSigError.Match(logContent) || reDownloadError.Match(logContent) {
|
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),
|
rows, err := db.DbPackage.Update().Where(dbpackage.And(dbpackage.Pkgbase(pkg.Pkgbase), dbpackage.March(pkg.March),
|
||||||
dbpackage.StatusEQ(dbpackage.StatusFailed))).ClearHash().SetStatus(dbpackage.StatusQueued).Save(context.Background())
|
dbpackage.StatusEQ(dbpackage.StatusFailed))).ClearHash().SetStatus(dbpackage.StatusQueued).Save(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -707,7 +709,7 @@ func logHK() error {
|
|||||||
if rows > 0 {
|
if rows > 0 {
|
||||||
log.Infof("[HK/%s/%s] fixable build-error detected, requeueing package (%d)", pkg.March, pkg.Pkgbase, rows)
|
log.Infof("[HK/%s/%s] fixable build-error detected, requeueing package (%d)", pkg.March, pkg.Pkgbase, rows)
|
||||||
}
|
}
|
||||||
} else if reLdError.Match(logContent) {
|
} else if reLdError.MatchString(sLogContent) || reRustLTOError.MatchString(sLogContent) {
|
||||||
rows, err := db.DbPackage.Update().Where(
|
rows, err := db.DbPackage.Update().Where(
|
||||||
dbpackage.And(
|
dbpackage.And(
|
||||||
dbpackage.Pkgbase(pkg.Pkgbase),
|
dbpackage.Pkgbase(pkg.Pkgbase),
|
||||||
|
Reference in New Issue
Block a user