canonicalize tag arches before using them to limit repo generation

(based on a patch from Dennis Gilmore <dennis@ausil.us>)
This commit is contained in:
Mike McLean 2008-01-16 16:15:00 -05:00
parent eb1c53de6e
commit 6feae640c2

View file

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