cli: support download-build --type=remote-sources

Prior to this change, "koji download-build --type=remote-sources" failed
with an AssertionError.

Add support for OSBS's cachito remote-sources btype.
This commit is contained in:
Ken Dreyer 2020-12-16 14:02:24 -07:00 committed by Tomas Kopecek
parent 1c5c7674bc
commit 659a450bc1
2 changed files with 5 additions and 1 deletions

View file

@ -653,6 +653,10 @@ def download_archive(build, archive, topurl, quiet=False, noprogress=False):
elif archive['btype'] == 'image':
url = os.path.join(pi.imagebuild(build), archive['filename'])
path = archive['filename']
elif archive['btype'] == 'remote-sources':
directory = pi.typedir(build, 'remote-sources')
url = os.path.join(directory, archive['filename'])
path = archive['filename']
else:
# TODO: cover module/operator-manifests/remote-sources
raise NotImplementedError(archive['btype'])