]> git.e2factory.org Git - e2factory.git/commitdiff
basic_source: add is_scm_source_class() and is_selected_source_class()
authorTobias Ulmer <tu@emlix.com>
Thu, 19 Jan 2017 16:53:29 +0000 (17:53 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 30 Jan 2017 13:33:34 +0000 (14:33 +0100)
These will be used to remove hardcoded source types in fetch-sources and
put the functionality into source plugins.

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

index 42d5d2096bcab2c54850511546dccfcfa9a8b133..39cf7ac6d96a17f2c884d51a95227a3df1387bf0 100644 (file)
@@ -37,6 +37,22 @@ local source_types = {}
 -- @type basic_source
 source.basic_source = class("basic_source")
 
+--- Whether the class is of a Source Code Management type.
+-- @return True or false
+function source.basic_source.static:is_scm_source_class()
+    assertIsTable(self)
+    return false
+end
+
+--- Whether this class of sources was selected on the command line.
+-- @param opts e2option table.
+-- @return True or false
+function source.basic_source.static:is_selected_source_class(opts)
+    assertIsTable(self)
+    assertIsTable(opts)
+    return false
+end
+
 --- Source base constructor. Assert error on invalid input.
 -- @param rawsrc Source config dict containing at least "name" and "type"
 -- attributes.