chiark / gitweb /
buildserver: delete corrupt files from the cache
authorHans-Christoph Steiner <hans@eds.org>
Wed, 6 Jul 2016 20:16:26 +0000 (22:16 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 6 Jul 2016 20:16:55 +0000 (22:16 +0200)
In order to make CI and other automation easier, delete any corrupt files
from the cache if they fail the SHA-256 check.

https://jenkins.debian.net/view/reproducible/job/reproducible_setup_fdroid_build_environment_profitbricks3/112/console

makebuildserver

index 62fee88deb5decbe818df6bd0f96b76515dc5064..173ca747291379b80abd4fd060b896034ecbe279 100755 (executable)
@@ -306,6 +306,7 @@ for srcurl, shasum in cachefiles:
         print("\t...shasum verified for " + local_filename)
     else:
         print("Invalid shasum of '" + v + "' detected for " + local_filename)
+        os.remove(local_filename)
         sys.exit(1)
 
 # use VirtualBox software virtualization if hardware is not available,