From 9d6d278ffbc967093d2e52489e41770bebdf18d0 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Tue, 3 Nov 2020 09:32:13 +0100 Subject: [PATCH] builder: invert missing arch support logic The builder plugin checks that all of the requested architectures are indeed supported, which is determined via the build tag. It does that by constructing two sets, the requested architectures and the supported architectures, and then constructing the set of (asymmetric) differences between the one and the other. This difference was meant to be "requested" - "supported", which then will contain architectures that have been requested but are not supported, or be empty in case all requested architectures are indeed supported (the good case). However, previously the diff was done the other way around ("supported" - "requested"), which will then return a set of architectures that are supported but were not requested, which is not what we want to check for. Invert that the argument of the difference to indeed end up with "requested" - "supported", which results in the correct check. --- plugins/builder/osbuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builder/osbuild.py b/plugins/builder/osbuild.py index e030b8b..3bab600 100644 --- a/plugins/builder/osbuild.py +++ b/plugins/builder/osbuild.py @@ -319,7 +319,7 @@ class OSBuildImage(BaseTaskHandler): # Architectures tag_arches = self.arches_for_config(buildconfig) arches = set(arches) - diff = tag_arches - arches + diff = arches - tag_arches if diff: raise koji.BuildError("Unsupported architecture(s): " + str(diff))