From: Tobias Ulmer Date: Wed, 29 May 2013 16:03:19 +0000 (+0200) Subject: Build results without unused indirection via function table X-Git-Tag: e2factory-2.3.15rc1~490 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=5db0a5980f5127186e9c812a705b7ad61534af40;p=e2factory.git Build results without unused indirection via function table Signed-off-by: Tobias Ulmer --- diff --git a/local/e2build.lua b/local/e2build.lua index c50a655..a6c10ee 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -1014,20 +1014,20 @@ local function build_result(info, result, return_flags) return true, nil end ---- build a set of results --- @param info --- @param results table: list of results, sorted by dependencies --- @return bool --- @return an error object on failure -local function build_results_default(info, results) +--- Build a set of results. +-- @param info Info table. +-- @param results List of results, sorted by dependencies. +-- @return True on success, false on error. +-- @return Error object on failure. +function e2build.build_results(info, results) e2lib.logf(3, "building results") + for _, r in ipairs(results) do local e = err.new("building result failed: %s", r) local flags = {} local t1 = os.time() local rc, re = build_result(info, r, flags) if not rc then - -- do not insert an error message from this layer. return false, e:cat(re) end local t2 = os.time() @@ -1037,20 +1037,7 @@ local function build_results_default(info, results) return true, nil end end - return true, nil -end - -local build_results_ftab = { - build_results_default, -} -function e2build.build_results(info, results) - for i,f in ipairs(build_results_ftab) do - local rc, re = f(info, results) - if not rc then - return rc, re - end - end return true, nil end