From bb2b53b13836b1e18b03b4696c21955397b7ee40 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 24 Jan 2017 14:32:35 +0100 Subject: [PATCH] source: add fetch/update/prepare source to basic_source class Signed-off-by: Tobias Ulmer --- local/source.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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 -------------------------------------------------------------------------------- -- 2.39.5