From: Gordon Hecker Date: Wed, 11 Nov 2009 12:44:07 +0000 (+0100) Subject: use e2tool.fileid() to get fileid for build scripts X-Git-Tag: e2factory-2.3.3rc1~17 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=bf5a9cd474ca68eb8902f6cfde9458494805a2fe;p=e2factory.git use e2tool.fileid() to get fileid for build scripts use e2tool.fileid() to get fileid for init scripts Signed-off-by: Gordon Hecker --- diff --git a/local/e2tool.lua b/local/e2tool.lua index 7c6a60b..abc6678 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -1161,13 +1161,16 @@ function e2tool.projid(info) if not e2lib.is_backup_file(f) then local location = string.format("proj/init/%s", e2lib.basename(f)) - local hash, e = e2tool.hash_file(info, - info.root_server_name, location) - if not hash then + local f = { + server = info.root_server_name, + location = location, + } + local fileid, e = e2tool.fileid(info, f) + if not fileid then e2lib.abort(e) end - hc:hash_line(location) -- the filename - hc:hash_line(hash) -- the file content + hc:hash_line(location) -- the filename + hc:hash_line(fileid) -- the file content end end hc:hash_line(info.release_id) @@ -1483,12 +1486,15 @@ function e2tool.pbuildid(info, resultname) hc:hash_line(r.envid) if not r.pseudo_result then local location = e2tool.resultbuildscript(info.results[resultname].directory) - local hash, re = e2tool.hash_file(info,info.root_server_name, - location) - if not hash then + local f = { + server = info.root_server_name, + location = location, + } + local fileid, re = e2tool.fileid(info, f) + if not fileid then return nil, e:cat(re) - end - hc:hash_line(hash) -- build script hash + end + hc:hash_line(fileid) -- build script hash end e2lib.log(4, string.format("hash data for resultid %s\n%s", resultname, hc.data))