1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-02 09:10:11 +02:00

build: improve error message when NDK SHA-256 does not match

This commit is contained in:
Hans-Christoph Steiner 2022-04-26 10:25:04 +02:00
parent e678df14ce
commit 189ff9cd7b
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA

View File

@ -4341,8 +4341,9 @@ def _install_ndk(ndk):
os.path.basename(url)
)
net.download_file(url, zipball)
if sha256 != sha256sum(zipball):
raise FDroidException('SHA-256 %s does not match expected for %s' % (sha256, url))
calced = sha256sum(zipball)
if sha256 != calced:
raise FDroidException('SHA-256 %s does not match expected for %s (%s)' % (calced, url, sha256))
logging.info(_('Unzipping to %s') % ndk_base)
with zipfile.ZipFile(zipball) as zipfp:
for info in zipfp.infolist():