chiark / gitweb /
prevent `fdroid publish` from repeatedly downloading the developer binary
authorHans-Christoph Steiner <hans@eds.org>
Wed, 7 Jan 2015 17:54:01 +0000 (18:54 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 12 Jan 2015 09:46:03 +0000 (10:46 +0100)
wget's --continue makes wget not overwrite the existing file, or create a
new version with a .1 extension.  Instead it tries to finish an incomplete
download, or does nothing if the download is complete and matching.

fdroidserver/publish.py

index 48d0503ef43d756b1d54fba499fa38b03b0ad9f8..fc54ee4fc5ae9e12f473ddc49b6ea660db2c0140 100644 (file)
@@ -144,7 +144,7 @@ def main():
             # Grab the binary from where the developer publishes it...
             logging.info("...retrieving " + url)
             srcapk = os.path.join(tmp_dir, url.split('/')[-1])
-            p = FDroidPopen(['wget', '-nv', url], cwd=tmp_dir)
+            p = FDroidPopen(['wget', '-nv', '--continue', url], cwd=tmp_dir)
             if p.returncode != 0 or not os.path.exists(srcapk):
                 logging.error("...failed to retrieve " + url +
                               " - publish skipped")