From 0e22c152ce8e3c78095d555700c5dc85a69f9824 Mon Sep 17 00:00:00 2001 From: Luiz Carvalho Date: Sep 18 2017 14:56:50 +0000 Subject: Fix arch-override for container-build The buildContainer task of koji-containerbuild expects the task options "arch_override", not "arches". It also expects the value to be a space separated string. Both of these are also similar to how the regular build command is defined. Signed-off-by: Luiz Carvalho --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index 259959b..776ac65 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -2651,9 +2651,17 @@ class Commands(object): task_opts = {} for key in ('scratch', 'name', 'version', 'release', - 'yum_repourls', 'git_branch', 'arches'): + 'yum_repourls', 'git_branch'): if key in opts: task_opts[key] = opts[key] + + scratch = opts.get('scratch') + arches = opts.get('arches') + if arches: + if not scratch: + raise rpkgError('Cannot override arches for non-scratch builds') + task_opts['arch_override'] = ' '.join(arches) + priority = opts.get("priority", None) task_id = self.kojisession.buildContainer(source, container_target,