6 Commits

3 changed files with 26 additions and 8 deletions

View File

@@ -408,9 +408,12 @@ func (b *BuildManager) syncWorker(ctx context.Context) error {
eligible, err := pkg.isEligible(ctx) eligible, err := pkg.isEligible(ctx)
if err != nil { if err != nil {
log.Infof("Unable to determine status for package %s: %v", pkg.Pkgbase, err) log.Infof("Unable to determine status for package %s: %v", pkg.Pkgbase, err)
b.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
continue
} }
if !eligible { if !eligible {
log.Debugf("skipped package %s (%v)", pkg.Pkgbase, err) log.Debugf("skipped package %s (%v)", pkg.Pkgbase, err)
b.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
continue continue
} }

View File

@@ -698,10 +698,20 @@ func (p *ProtoPackage) findPkgFiles() error {
return err return err
} }
if p.DbPackage == nil && p.Srcinfo == nil {
return fmt.Errorf("unable to find pkgfiles without dbpkg or srcinfo present")
}
var realPkgs []string var realPkgs []string
if p.DbPackage != nil {
for _, realPkg := range p.DbPackage.Packages { for _, realPkg := range p.DbPackage.Packages {
realPkgs = append(realPkgs, realPkg) realPkgs = append(realPkgs, realPkg)
} }
} else {
for _, realPkg := range p.Srcinfo.Packages {
realPkgs = append(realPkgs, realPkg.Pkgname)
}
}
var fPkg []string var fPkg []string
for _, file := range pkgs { for _, file := range pkgs {

View File

@@ -262,6 +262,7 @@ func genQueue(path string) ([]*ProtoPackage, error) {
March: march, March: march,
FullRepo: mPkgbuild.Repo() + "-" + march, FullRepo: mPkgbuild.Repo() + "-" + march,
Hash: b3s, Hash: b3s,
DbPackage: dbPkg,
}) })
} }
} }
@@ -730,6 +731,10 @@ func setupMakepkg(march string) error {
makepkgStr = strings.ReplaceAll(makepkgStr, "#MAKEFLAGS=\"-j2\"", "MAKEFLAGS=\"-j"+strconv.Itoa(conf.Build.Makej)+"\"") makepkgStr = strings.ReplaceAll(makepkgStr, "#MAKEFLAGS=\"-j2\"", "MAKEFLAGS=\"-j"+strconv.Itoa(conf.Build.Makej)+"\"")
makepkgStr = reMarch.ReplaceAllString(makepkgStr, "${1}"+march) makepkgStr = reMarch.ReplaceAllString(makepkgStr, "${1}"+march)
makepkgStr = strings.ReplaceAll(makepkgStr, "#PACKAGER=\"John Doe <john@doe.com>\"", "PACKAGER=\"ALHP "+march+" <alhp@harting.dev>\"") makepkgStr = strings.ReplaceAll(makepkgStr, "#PACKAGER=\"John Doe <john@doe.com>\"", "PACKAGER=\"ALHP "+march+" <alhp@harting.dev>\"")
// enable rust flags and patch them
makepkgStr = strings.ReplaceAll(makepkgStr, "#RUSTFLAGS=", "RUSTFLAGS=")
makepkgStr = strings.ReplaceAll(makepkgStr, "-C opt-level=2", "-C opt-level=3")
makepkgStr = strings.ReplaceAll(makepkgStr, "-C opt-level=3", "-C opt-level=3 -C target-cpu="+march+" -C lto=fat -C codegen-units=1 -C strip=symbols -C linker-plugin-lto")
// write makepkg // write makepkg
err = os.WriteFile(lMakepkg, []byte(makepkgStr), 0644) err = os.WriteFile(lMakepkg, []byte(makepkgStr), 0644)