]> git.e2factory.org Git - e2factory.git/commitdiff
collect_project: add static method for adding src to cp-result functions
authorTobias Ulmer <tu@emlix.com>
Wed, 25 Jan 2017 16:31:10 +0000 (17:31 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 30 Jan 2017 13:33:34 +0000 (14:33 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
plugins/collect_project.lua

index 2c673ebe886cccd51c57e3e0c5df099a91c56b77..c7da77203e6074e439f900e47f5cf77695b4ec82 100644 (file)
@@ -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)