From: Tobias Ulmer Date: Wed, 8 Jan 2014 17:43:42 +0000 (+0100) Subject: Make load_source_config() plural and add documentation X-Git-Tag: e2factory-2.3.15rc1~273 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=42b280d440967b876a76bb9dd4b18c64b4c86fea;p=e2factory.git Make load_source_config() plural and add documentation Reflect that this function loads all source configs into the info table. Signed-off-by: Tobias Ulmer --- diff --git a/local/e2tool.lua b/local/e2tool.lua index 5c928c0..fd16afd 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -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