From: Tobias Ulmer Date: Thu, 19 Jan 2017 16:53:29 +0000 (+0100) Subject: basic_source: add is_scm_source_class() and is_selected_source_class() X-Git-Tag: e2factory-2.3.17~69 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=04a2aef5ae506cf51fb9b69bf7c97b28c4ebe5fe;p=e2factory.git basic_source: add is_scm_source_class() and is_selected_source_class() These will be used to remove hardcoded source types in fetch-sources and put the functionality into source plugins. Signed-off-by: Tobias Ulmer --- diff --git a/local/source.lua b/local/source.lua index 42d5d20..39cf7ac 100644 --- a/local/source.lua +++ b/local/source.lua @@ -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.