chiark / gitweb /
verify: if downloading from /repo/ fails, try /archive/
authorHans-Christoph Steiner <hans@eds.org>
Mon, 17 Jul 2017 10:11:33 +0000 (12:11 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 19 Jul 2017 13:07:50 +0000 (15:07 +0200)
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.

fdroidserver/verify.py

index 966c3874fad2678fc3e48d29b8b4baf5698137d3..85d1d2b2f55f5b0fd86091ee5f1ae343db9f6763 100644 (file)
@@ -80,7 +80,10 @@ def main():
             try:
                 net.download_file(url, dldir=tmp_dir)
             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(
                 remoteapk,