From: Tobias Ulmer Date: Mon, 25 Nov 2013 16:26:57 +0000 (+0100) Subject: Deal with chrootgroupid() errors and remove dead code X-Git-Tag: e2factory-2.3.15rc1~337 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=fcec3a2df6a3b844fa19c6ae19d0a6e0f29022c8;p=e2factory.git Deal with chrootgroupid() errors and remove dead code Signed-off-by: Tobias Ulmer --- diff --git a/local/e2tool.lua b/local/e2tool.lua index daab6f7..6c863d1 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -2233,6 +2233,10 @@ function e2tool.buildid(info, resultname) end --- chroot group id. +-- @param info Info table. +-- @param groupname +-- @return Chroot group ID or false on error. +-- @return Error object on failure. local function chrootgroupid(info, groupname) local e = err.new("calculating chroot group id failed for group %s", groupname) @@ -2314,7 +2318,10 @@ function e2tool.pbuildid(info, resultname) if r.chroot then for _,g in ipairs(r.chroot) do - local groupid = chrootgroupid(info, g) + local groupid, re = chrootgroupid(info, g) + if not groupid then + return false, e:cat(re) + end hash.hash_line(hc, g) hash.hash_line(hc, groupid) end @@ -2406,13 +2413,6 @@ function e2tool.flush_buildids(info) end end ---- calculate chrootids. -local function calc_chrootids(info) - for _,grp in pairs(info.chroot.groups) do - chrootgroupid(info, grp.name) - end -end - --- return a table of environment variables valid for a result -- @param info the info table -- @param resultname string: name of a result