From 06ac4749593aead9d86b7a1fbbc88053f72f9337 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Tue, 19 May 2026 02:27:44 +0200 Subject: [PATCH] ignore stale extra-any state files when upstream arch differs --- buildmanager.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/buildmanager.go b/buildmanager.go index 1deb7fc..b6d8e00 100644 --- a/buildmanager.go +++ b/buildmanager.go @@ -470,6 +470,15 @@ func (b *BuildManager) genQueue(ctx context.Context) ([]*ProtoPackage, error) { // stale x86_64 state files behind. SyncPkg was resolved by // isAvailable above; reuse it. if pkg.SyncPkg != nil { + // Stale extra-any state file (upstream moved from any-arch to + // a concrete arch and state.git left the old any file behind). + // Skip this iteration without writing to the DB so the sibling + // concrete-arch state file is authoritative. + if pkg.SyncPkg.Architecture() != "any" && pkg.Arch == "any" { + log.Debugf("[QG] %s->%s ignoring stale extra-any state file (upstream arch: %s)", + pkg.FullRepo, pkg.Pkgbase, pkg.SyncPkg.Architecture()) + continue + } if pkg.SyncPkg.Architecture() == "any" && pkg.Arch == "x86_64" { // Already marked from a prior cycle: nothing to redo. // Accept SkipReasonAnyArch too — when both extra-any and