From 453c6d8a3ac32d3da0fa0db1a59afced61ec1cf1 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Mon, 22 Jul 2024 17:08:49 +0200 Subject: [PATCH] fix edge-case, where a package was not cleared in the db because no files where present --- buildmanager.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildmanager.go b/buildmanager.go index 40ef0dd..54b18a0 100644 --- a/buildmanager.go +++ b/buildmanager.go @@ -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 } }