From 6feae640c291ae24de8e855b8564ff786527dcb9 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Wed, 16 Jan 2008 16:15:00 -0500 Subject: [PATCH] canonicalize tag arches before using them to limit repo generation (based on a patch from Dennis Gilmore ) --- hub/kojihub.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index aa4b2219..af5fd2c9 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -1680,10 +1680,10 @@ def repo_init(tag, with_src=False, with_debuginfo=False): state = koji.REPO_INIT tinfo = get_tag(tag, strict=True) tag_id = tinfo['id'] + repo_arches = {} if tinfo['arches']: - tag_arches = tinfo['arches'].split() - else: - tag_arches = [] + for arch in tinfo['arches'].split() + repo_arches[koji.canonArch(arch)] = 1 repo_id = _singleValue("SELECT nextval('repo_id_seq')") event_id = _singleValue("SELECT get_event()") q = """INSERT INTO repo(id, create_event, tag_id, state) @@ -1708,7 +1708,7 @@ def repo_init(tag, with_src=False, with_debuginfo=False): continue elif arch == 'noarch': pass - elif repoarch not in tag_arches: + elif repoarch not in repo_arches: # Do not create a repo for arches not in the arch list for this tag continue build = builds[rpminfo['build_id']]