From: Tobias Ulmer Date: Tue, 24 Jan 2017 16:35:58 +0000 (+0100) Subject: scm: remove generic_source_check() X-Git-Tag: e2factory-2.3.17~41 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=fd68df947459cc58fec6191a27fd4501bc868ebd;p=e2factory.git scm: remove generic_source_check() Signed-off-by: Tobias Ulmer --- diff --git a/local/scm.lua b/local/scm.lua index 38090b8..b6dd91b 100644 --- a/local/scm.lua +++ b/local/scm.lua @@ -133,27 +133,6 @@ function scm.register_function(scmtype, name, func) return true end ---- do some consistency checks required before using sources --- @param info --- @param sourcename string: source name --- @param require_workingcopy bool: return error if the workingcopy is missing --- @return bool --- @return an error object on failure -function scm.generic_source_check(info, sourcename, require_workingcopy) - local rc, re, src - src = source.sources[sourcename] - - rc, re = src:working_copy_available() - if (not rc) and require_workingcopy then - return false, err.new("working copy is not available") - end - rc, re = src:check_workingcopy() - if not rc then - return false, re - end - return true -end - scm.register_interface("toresult") return strict.lock(scm)