PR#2682: don't assume that the hub will report arches for external repos
Merges #2682 https://pagure.io/koji/pull-request/2682 Fixes: #2681 https://pagure.io/koji/issue/2681 taginfo fail with older hub if external repos are set
This commit is contained in:
commit
3189dcb98a
2 changed files with 5 additions and 2 deletions
|
|
@ -5557,7 +5557,7 @@ class CreaterepoTask(BaseTaskHandler):
|
|||
# generate repo url list, starting with our local premerge repo
|
||||
repos = ['file://' + localdir + '/']
|
||||
for repo in external_repos:
|
||||
if repo['arches'] and arch not in repo['arches'].split():
|
||||
if repo.get('arches') and arch not in repo['arches'].split():
|
||||
# ignore external repo with non-relevant archlist
|
||||
continue
|
||||
ext_url = repo['url']
|
||||
|
|
|
|||
|
|
@ -4937,7 +4937,10 @@ def anon_handle_taginfo(goptions, session, args):
|
|||
if external_repos:
|
||||
print("External repos:")
|
||||
for rinfo in external_repos:
|
||||
if not rinfo['arches']:
|
||||
if 'arches' not in rinfo:
|
||||
# older hubs will not return this field
|
||||
rinfo['arches'] = '-'
|
||||
elif not rinfo['arches']:
|
||||
rinfo['arches'] = 'inherited from tag'
|
||||
# TODO else intersection of arches?
|
||||
print(" %(priority)3i %(external_repo_name)s "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue