From: Tobias Ulmer Date: Wed, 25 Jan 2017 16:31:10 +0000 (+0100) Subject: collect_project: add static method for adding src to cp-result functions X-Git-Tag: e2factory-2.3.17~35 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=bf32bde79a0c394e4cb8badbd679a8055b726d7e;p=e2factory.git collect_project: add static method for adding src to cp-result functions Signed-off-by: Tobias Ulmer --- diff --git a/plugins/collect_project.lua b/plugins/collect_project.lua index 2c673eb..c7da772 100644 --- a/plugins/collect_project.lua +++ b/plugins/collect_project.lua @@ -39,8 +39,10 @@ local source = require("source") local strict = require("strict") -------------------------------------------------------------------------------- --- collect project build process step first because real forward declarations --- aren't a thing in Lua. + +local _source_to_result_functions = { + -- type = function() +} --- Create Makefile based structure required to build the project -- without e2factory @@ -380,6 +382,12 @@ end local collect_project_class = class("collect_project_class", result.basic_result) +function collect_project_class.static:add_source_to_result_fn(typ, func) + assertIsStringN(typ) + assertIsFunction(func) + _source_to_result_functions[typ] = func +end + function collect_project_class:initialize(rawres) assertIsTable(rawres) assertNotNil(rawres.collect_project)