fix edge-case, where a package was not cleared in the db because no files where present

This commit is contained in:
Giovanni Harting 2024-07-22 17:08:49 +02:00
parent 3da529478b
commit 453c6d8a3a

View File

@ -210,6 +210,9 @@ func (b *BuildManager) repoWorker(repo string) {
log.Warningf("[%s/%s] unable to find files: %v", pkg.FullRepo, pkg.Pkgbase, err)
continue
} else if len(pkg.PkgFiles) == 0 {
if pkg.DBPackage != nil {
_ = pkg.DBPackage.Update().ClearRepoVersion().ClearTagRev().Exec(context.Background())
}
continue
}
}