added automatic LTO fail detection for some cases based on build output

This commit is contained in:
2021-11-25 01:50:49 +01:00
parent d5e9832b33
commit 743b08bba1
6 changed files with 48 additions and 31 deletions

View File

@@ -39,6 +39,7 @@ var (
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)^\s*collect2: error: ld returned (\d+) exit status$`)
)
type BuildPackage struct {
@@ -354,10 +355,10 @@ func packages2slice(pkgs interface{}) []string {
}
}
func importKeys(pkg *BuildPackage) error {
if pkg.Srcinfo.ValidPGPKeys != nil {
func (p *BuildPackage) importKeys() error {
if p.Srcinfo.ValidPGPKeys != nil {
args := []string{"--keyserver", "keyserver.ubuntu.com", "--recv-keys"}
args = append(args, pkg.Srcinfo.ValidPGPKeys...)
args = append(args, p.Srcinfo.ValidPGPKeys...)
cmd := exec.Command("gpg", args...)
_, err := cmd.CombinedOutput()