From 8c025b91d8fb726765acd8854308dbfb6b7c9158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Mon, 28 Jan 2019 22:16:48 +0100 Subject: [PATCH] makebuildserver: avoid trying to continue cache downloads when checksum is okay --- makebuildserver | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makebuildserver b/makebuildserver index fe3e947d..f632d278 100755 --- a/makebuildserver +++ b/makebuildserver @@ -423,6 +423,9 @@ def update_cache(cachedir, cachefiles): local_filename = os.path.join(cachedir, filename) if os.path.exists(local_filename): + if sha256_for_file(local_filename) == shasum: + logger.info("\t...shasum verified for %s", local_filename) + continue local_length = os.path.getsize(local_filename) else: local_length = -1