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']]