forked from ALHP/ALHP.GO
Compare commits
6 Commits
fix/PR_109
...
feat/rust_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
20ea64acdc | ||
be46f92cbe | |||
65d6e7e135 | |||
dd118c5f97 | |||
ca85586118 | |||
78666f9899 |
3
main.go
3
main.go
@@ -408,9 +408,12 @@ func (b *BuildManager) syncWorker(ctx context.Context) error {
|
||||
eligible, err := pkg.isEligible(ctx)
|
||||
if err != nil {
|
||||
log.Infof("Unable to determine status for package %s: %v", pkg.Pkgbase, err)
|
||||
b.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
|
||||
continue
|
||||
}
|
||||
if !eligible {
|
||||
log.Debugf("skipped package %s (%v)", pkg.Pkgbase, err)
|
||||
b.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
|
||||
continue
|
||||
}
|
||||
|
||||
|
@@ -698,9 +698,19 @@ func (p *ProtoPackage) findPkgFiles() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if p.DbPackage == nil && p.Srcinfo == nil {
|
||||
return fmt.Errorf("unable to find pkgfiles without dbpkg or srcinfo present")
|
||||
}
|
||||
|
||||
var realPkgs []string
|
||||
for _, realPkg := range p.DbPackage.Packages {
|
||||
realPkgs = append(realPkgs, realPkg)
|
||||
if p.DbPackage != nil {
|
||||
for _, realPkg := range p.DbPackage.Packages {
|
||||
realPkgs = append(realPkgs, realPkg)
|
||||
}
|
||||
} else {
|
||||
for _, realPkg := range p.Srcinfo.Packages {
|
||||
realPkgs = append(realPkgs, realPkg.Pkgname)
|
||||
}
|
||||
}
|
||||
|
||||
var fPkg []string
|
||||
|
17
utils.go
17
utils.go
@@ -256,12 +256,13 @@ func genQueue(path string) ([]*ProtoPackage, error) {
|
||||
}
|
||||
|
||||
pkgbuilds = append(pkgbuilds, &ProtoPackage{
|
||||
Pkgbuild: pkgbuild,
|
||||
Pkgbase: mPkgbuild.PkgBase(),
|
||||
Repo: dbpackage.Repository(mPkgbuild.Repo()),
|
||||
March: march,
|
||||
FullRepo: mPkgbuild.Repo() + "-" + march,
|
||||
Hash: b3s,
|
||||
Pkgbuild: pkgbuild,
|
||||
Pkgbase: mPkgbuild.PkgBase(),
|
||||
Repo: dbpackage.Repository(mPkgbuild.Repo()),
|
||||
March: march,
|
||||
FullRepo: mPkgbuild.Repo() + "-" + march,
|
||||
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 = reMarch.ReplaceAllString(makepkgStr, "${1}"+march)
|
||||
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
|
||||
err = os.WriteFile(lMakepkg, []byte(makepkgStr), 0644)
|
||||
|
Reference in New Issue
Block a user