From 4c7e37d39d82f726000855883bb62d3cedafc286 Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Feb 19 2016 08:33:11 +0000 Subject: Fix handling of --arch param when a target is specified Without this patch mock-config ignores --arch option and generates invalid mock config files which contain incorrect statements like: config_optstarget_arch? = None config_optsyum.conf? = '..SNIP..baseurl=URL_WITH_ARCH_NONE..SNIP..' Resolves: * https://fedorahosted.org/koji/ticket/301 * https://bugzilla.redhat.com/show_bug.cgi?id=1248368 * https://bugzilla.redhat.com/show_bug.cgi?id=1161610 Signed-off-by: Tomas Mlcoch --- diff --git a/cli/koji b/cli/koji index ca4eaf8..c5f8490 100755 --- a/cli/koji +++ b/cli/koji @@ -1407,6 +1407,7 @@ def anon_handle_mock_config(options, session, args): if not options.arch: print _("Please specify an arch") return 1 + arch = options.arch target = session.getBuildTarget(options.target) if not target: parser.error(_("Invalid target: %s" % options.target))