From 8ce34746cf5a2438fd27ec1af19e774192711e37 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Thu, 29 Oct 2009 14:03:54 +0100 Subject: [PATCH] files sources: verify hashes for source files if available Signed-off-by: Gordon Hecker --- local/files.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/local/files.lua b/local/files.lua index e26286b..d171f3f 100644 --- a/local/files.lua +++ b/local/files.lua @@ -224,6 +224,12 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) e2lib.log(4, string.format("prepare source: %s", sourcename)) local s = info.sources[sourcename] for _,file in ipairs(info.sources[sourcename].file) do + if file.sha1 then + rc, re = e2tool.verify_hash(info, file.server, file.location, file.sha1) + if not rc then + return false, e:cat(re) + end + end if file.unpack then local cache_flags = { cache = true } local rc, re = cache.cache_file(info.cache, file.server, file.location, -- 2.39.5