]> git.e2factory.org Git - e2factory.git/commitdiff
source: add fetch/update/prepare source to basic_source class
authorTobias Ulmer <tu@emlix.com>
Tue, 24 Jan 2017 13:32:35 +0000 (14:32 +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>
local/source.lua

index 87a2e9a314c738f59f53abd1eeaeae0507c0e6af..5c5a967130db3df3def9c726d800a18c72edad68 100644 (file)
@@ -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
 
 --------------------------------------------------------------------------------