]> git.e2factory.org Git - e2factory.git/commitdiff
scm: remove generic_source_check()
authorTobias Ulmer <tu@emlix.com>
Tue, 24 Jan 2017 16:35:58 +0000 (17:35 +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/scm.lua

index 38090b82c0ccfe29ebeea08caf62609d2a0cc41a..b6dd91b2306a8b9d4ed759fbce27c45842a41ae0 100644 (file)
@@ -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)