]> git.e2factory.org Git - e2factory.git/commitdiff
Make load_source_config() plural and add documentation
authorTobias Ulmer <tu@emlix.com>
Wed, 8 Jan 2014 17:43:42 +0000 (18:43 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Reflect that this function loads all source configs into the info table.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/e2tool.lua

index 5c928c026ef0ff01f83da6adce2dfef9f1c29744..fd16afdd0ed4291ed6645d2eef026ee3a00751d7 100644 (file)
@@ -958,8 +958,11 @@ function e2tool.src_res_path_to_name(pathname)
     return pathname:gsub("/", ".")
 end
 
---- load source config.
-local function load_source_config(info)
+--- Load all source configs. Creates and populates the info.sources dictionary.
+-- @param info Info table.
+-- @return True on success, false on error.
+-- @return Error object on failure.
+local function load_source_configs(info)
     local e = err.new("error loading source configuration")
     info.sources = {}
 
@@ -1013,7 +1016,7 @@ local function load_source_config(info)
             info.sources[name] = item.data
         end
     end
-    return true, nil
+    return true
 end
 
 --- Get project-relative directory for a result.
@@ -1358,7 +1361,7 @@ function e2tool.collect_project_info(info, skip_load_config)
     end
     table.sort(info.licences_sorted)
 
-    rc, re = load_source_config(info)
+    rc, re = load_source_configs(info)
     if not rc then
         return false, e:cat(re)
     end