support modules and other btypes in download-build

Fixes https://pagure.io/koji/issue/2677
This commit is contained in:
Mike McLean 2021-02-02 15:16:34 -05:00 committed by Tomas Kopecek
parent 13db845422
commit 5bc690c4ea

View file

@ -653,13 +653,11 @@ 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')
else:
# non-legacy types are more systematic
directory = pi.typedir(build, archive['btype'])
url = os.path.join(directory, archive['filename'])
path = archive['filename']
else:
# TODO: cover module/operator-manifests/remote-sources
raise NotImplementedError(archive['btype'])
download_file(url, path, quiet=quiet, noprogress=noprogress, filesize=archive['size'])