added detection for already build packages waiting to be moved
This commit is contained in:
parent
e6dd3fd3ef
commit
9822c43cf1
@ -601,6 +601,15 @@ func (b *BuildManager) genQueue() ([]*ProtoPackage, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
aBuild, err := pkg.IsBuild()
|
||||
if err != nil {
|
||||
log.Warningf("[QG] %s->%s error determining build packages: %v", pkg.FullRepo, pkg.Pkgbase, err)
|
||||
}
|
||||
if aBuild {
|
||||
log.Infof("[QG] %s->%s already build, skipping build", pkg.FullRepo, pkg.Pkgbase)
|
||||
continue
|
||||
}
|
||||
|
||||
if pkg.DBPackage == nil {
|
||||
err = pkg.toDBPackage(true)
|
||||
if err != nil {
|
||||
|
@ -721,3 +721,16 @@ func (p *ProtoPackage) isMirrorLatest(h *alpm.Handle) (latest bool, foundPkg alp
|
||||
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) {
|
||||
if p.DBPackage == nil {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
matches, err := filepath.Glob(filepath.Join(conf.Basedir.Work, waitingDir, p.FullRepo, p.DBPackage.Packages[0]+"*-x86_64.pkg.tar.zst"))
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return len(matches) > 0, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user