verify: if downloading from /repo/ fails, try /archive/

The Builds entries in metadata/ files do not easily say whether a
given APK is in the repo/ or the archive/.  So it should also try to
download the official APK from the archive/ when verifying.
This commit is contained in:
Hans-Christoph Steiner 2017-07-17 12:11:33 +02:00
parent 67d98c5a36
commit 7613c18dd8

View file

@ -80,7 +80,10 @@ def main():
try: try:
net.download_file(url, dldir=tmp_dir) net.download_file(url, dldir=tmp_dir)
except requests.exceptions.HTTPError as e: except requests.exceptions.HTTPError as e:
raise FDroidException('Downloading %s failed. %s', (url, e)) try:
net.download_file(url.replace('/repo', '/archive/'), dldir=tmp_dir)
except requests.exceptions.HTTPError as e:
raise FDroidException('Downloading %s failed. %s', (url, e))
compare_result = common.verify_apks( compare_result = common.verify_apks(
remoteapk, remoteapk,