From: Tobias Ulmer Date: Tue, 24 Jan 2017 13:32:35 +0000 (+0100) Subject: source: add fetch/update/prepare source to basic_source class X-Git-Tag: e2factory-2.3.17~47 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=bb2b53b13836b1e18b03b4696c21955397b7ee40;p=e2factory.git source: add fetch/update/prepare source to basic_source class Signed-off-by: Tobias Ulmer --- diff --git a/local/source.lua b/local/source.lua index 87a2e9a..5c5a967 100644 --- a/local/source.lua +++ b/local/source.lua @@ -155,6 +155,34 @@ function source.basic_source:check_workingcopy() self._type, self._name)) end +--- Fetch working copy (or equivalent) from server, if required. +-- @return True on success, false on error. +-- Error object on failure. +function source.basic_source:fetch_source() + error(err.new("called fetch_source() of source base class, type %s name %s", + self._type, self._name)) +end + +--- Update the existing working copy (or equiv) from server, if required. +-- @return True on success, false on error. +-- Error object on failure. +function source.basic_source:update_source() + error(err.new("called update_source() of source base class, type %s name %s", + self._type, self._name)) +end + +--- Place source into buildpath/sourcename according to sourceset. +-- @param sourceset source setting string. +-- @param buildpath target location. +-- @return True on success, false on error. +-- Error object on failure. +function source.basic_source:prepare_source(sourceset, buildpath) + assertIsStringN(sourceset) + assertIsStringN(buildpath) + error(err.new("called prepare_source() of source base class, type %s name %s", + self._type, self._name)) +end + --- @section end --------------------------------------------------------------------------------