fix up cli buildinfo

This commit is contained in:
Mike McLean 2016-08-22 10:35:35 -04:00
parent 0cef35e50a
commit 9103efe6ea

View file

@ -3320,12 +3320,16 @@ def anon_handle_buildinfo(options, session, args):
for archive in img_archives:
archives_seen.setdefault(archive['id'], 1)
print os.path.join(koji.pathinfo.imagebuild(info), archive['filename'])
other_archives = session.listArchives(buildID=info['id'])
other_archives = [a for a in other_archives if a['id'] not in archives_seen]
if other_archives:
print 'Archives:'
for archive in other_archives:
print os.path.join(koji.pathinfo.typedir(info), archive['filename'])
archive_idx = {}
for archive in session.listArchives(buildID=info['id']):
if archive['id'] in archives_seen:
continue
archive_idx.setdefault(archive['btype'], []).append(archive)
for btype in archive_idx:
archives = archive_idx[btype]
print '%s Archives:' % btype.capitalize()
for archive in archives:
print os.path.join(koji.pathinfo.typedir(info, btype), archive['filename'])
if rpms:
print "RPMs:"
for rpm in rpms: