]> git.e2factory.org Git - e2factory.git/commitdiff
Make e2tool.get_depends() local, e2tool.dlist should be used instead
authorTobias Ulmer <tu@emlix.com>
Fri, 13 Dec 2013 17:08:03 +0000 (18:08 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2tool.lua

index b7a9a98b8fa5b177263515f4df50a1cc8fbbe89d..5dd2bfb914e6b585bcca94d9e660bd2d03c0af87 100644 (file)
@@ -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