From: Tobias Ulmer Date: Fri, 13 Dec 2013 17:08:03 +0000 (+0100) Subject: Make e2tool.get_depends() local, e2tool.dlist should be used instead X-Git-Tag: e2factory-2.3.15rc1~275 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=3b89205f8b0a28fc1f68e11e9232b6b1a22c3e78;p=e2factory.git Make e2tool.get_depends() local, e2tool.dlist should be used instead Signed-off-by: Tobias Ulmer --- diff --git a/local/e2tool.lua b/local/e2tool.lua index b7a9a98..5dd2bfb 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -633,6 +633,19 @@ local function init_umask(info) e2tool.reset_umask(info) end +--- get dependencies for use in build order calculation +local function get_depends(info, resultname) + local t = {} + local res = info.results[resultname] + if not res.depends then + return t + end + for _,d in ipairs(res.depends) do + table.insert(t, d) + end + return t +end + --- initialize the local library, load and initialize local plugins -- @param path string: path to project tree -- @param tool string: tool name (without the 'e2-' prefix) @@ -671,7 +684,7 @@ function e2tool.local_init(path, tool) return nil, e:cat(re) end - rc, re = e2tool.register_dlist(info, e2tool.get_depends) + rc, re = e2tool.register_dlist(info, get_depends) if not rc then return nil, e:cat(re) end @@ -1714,19 +1727,6 @@ function e2tool.check_project_info(info) return true, nil end ---- get dependencies for use in build order calculation -function e2tool.get_depends(info, resultname) - local t = {} - local res = info.results[resultname] - if not res.depends then - return t - end - for _,d in ipairs(res.depends) do - table.insert(t, d) - end - return t -end - --- e2tool.dlist(INFO, RESULT) -> ARRAY. -- -- Returns a sorted array with all dependencies for the given RESULT in the