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:
parent
eb1c53de6e
commit
6feae640c2
1 changed files with 4 additions and 4 deletions
|
|
@ -1680,10 +1680,10 @@ def repo_init(tag, with_src=False, with_debuginfo=False):
|
||||||
state = koji.REPO_INIT
|
state = koji.REPO_INIT
|
||||||
tinfo = get_tag(tag, strict=True)
|
tinfo = get_tag(tag, strict=True)
|
||||||
tag_id = tinfo['id']
|
tag_id = tinfo['id']
|
||||||
|
repo_arches = {}
|
||||||
if tinfo['arches']:
|
if tinfo['arches']:
|
||||||
tag_arches = tinfo['arches'].split()
|
for arch in tinfo['arches'].split()
|
||||||
else:
|
repo_arches[koji.canonArch(arch)] = 1
|
||||||
tag_arches = []
|
|
||||||
repo_id = _singleValue("SELECT nextval('repo_id_seq')")
|
repo_id = _singleValue("SELECT nextval('repo_id_seq')")
|
||||||
event_id = _singleValue("SELECT get_event()")
|
event_id = _singleValue("SELECT get_event()")
|
||||||
q = """INSERT INTO repo(id, create_event, tag_id, state)
|
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
|
continue
|
||||||
elif arch == 'noarch':
|
elif arch == 'noarch':
|
||||||
pass
|
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
|
# Do not create a repo for arches not in the arch list for this tag
|
||||||
continue
|
continue
|
||||||
build = builds[rpminfo['build_id']]
|
build = builds[rpminfo['build_id']]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue