diff --git a/buildmanager.go b/buildmanager.go index 34a8ea8..2ea1c3c 100644 --- a/buildmanager.go +++ b/buildmanager.go @@ -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 } diff --git a/housekeeping.go b/housekeeping.go index f6b8a43..4f4abd1 100644 --- a/housekeeping.go +++ b/housekeeping.go @@ -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) } diff --git a/proto_package.go b/proto_package.go index 1f38d94..cd62a8f 100644 --- a/proto_package.go +++ b/proto_package.go @@ -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 }