add new no-build globs to HK; typos

This commit is contained in:
Giovanni Harting 2024-06-24 00:27:09 +02:00
parent f66be19131
commit 10baa7d290
3 changed files with 12 additions and 6 deletions

View File

@ -414,12 +414,12 @@ func (b *BuildManager) genQueue() ([]*ProtoPackage, error) {
continue
}
aBuild, err := pkg.IsBuild()
aBuild, err := pkg.IsBuilt()
if err != nil {
log.Warningf("[QG] %s->%s error determining build packages: %v", pkg.FullRepo, pkg.Pkgbase, err)
log.Warningf("[QG] %s->%s error determining built packages: %v", pkg.FullRepo, pkg.Pkgbase, err)
}
if aBuild {
log.Infof("[QG] %s->%s already build, skipping build", pkg.FullRepo, pkg.Pkgbase)
log.Infof("[QG] %s->%s already built, skipping build", pkg.FullRepo, pkg.Pkgbase)
continue
}

View File

@ -50,6 +50,12 @@ func housekeeping(repo, march string, wg *sync.WaitGroup) error {
Arch: *mPackage.Arch(),
}
matchNoBuild, err := MatchGlobList(pkg.Pkgbase, conf.Blacklist.Packages)
if err != nil {
log.Errorf("[HK] %s->%s error parsing no-build glob: %v", pkg.FullRepo, mPackage.Name(), err)
continue
}
// check if package is still part of repo
dbs, err := alpmHandle.SyncDBs()
if err != nil {
@ -63,7 +69,7 @@ func housekeeping(repo, march string, wg *sync.WaitGroup) error {
pkgResolved.DB().Name() != pkg.Repo.String() ||
pkgResolved.Architecture() != pkg.Arch ||
pkgResolved.Name() != mPackage.Name() ||
Contains(conf.Blacklist.Packages, pkg.Pkgbase) {
matchNoBuild {
switch {
case err != nil:
log.Infof("[HK] %s->%s not included in repo (resolve error: %v)", pkg.FullRepo, mPackage.Name(), err)
@ -79,7 +85,7 @@ func housekeeping(repo, march string, wg *sync.WaitGroup) error {
case pkgResolved.Name() != mPackage.Name():
log.Infof("[HK] %s->%s not included in repo (name mismatch: repo:%s != pkg:%s)", pkg.FullRepo,
mPackage.Name(), pkgResolved.Name(), mPackage.Name())
case Contains(conf.Blacklist.Packages, pkg.Pkgbase):
case matchNoBuild:
log.Infof("[HK] %s->%s not included in repo (blacklisted pkgbase %s)", pkg.FullRepo, mPackage.Name(), pkg.Pkgbase)
}

View File

@ -750,7 +750,7 @@ func (p *ProtoPackage) PkgbaseEquals(p2 *ProtoPackage, marchSensitive bool) bool
return (marchSensitive && (p.Pkgbase == p2.Pkgbase && p.FullRepo == p2.FullRepo)) || (!marchSensitive && p.Pkgbase == p2.Pkgbase)
}
func (p *ProtoPackage) IsBuild() (bool, error) {
func (p *ProtoPackage) IsBuilt() (bool, error) {
if p.DBPackage == nil {
return false, nil
}