From: Gordon Hecker Date: Thu, 29 Oct 2009 13:03:54 +0000 (+0100) Subject: files sources: verify hashes for source files if available X-Git-Tag: e2factory-2.3.2rc1~22 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=8ce34746cf5a2438fd27ec1af19e774192711e37;p=e2factory.git files sources: verify hashes for source files if available Signed-off-by: Gordon Hecker --- 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,