From: Tobias Ulmer Date: Mon, 15 Apr 2013 17:35:36 +0000 (+0200) Subject: git: remove e2lib.abort() X-Git-Tag: e2factory-2.3.15rc1~530 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=d914e85e698714382a858535a0f462074deb4cb8;p=e2factory.git git: remove e2lib.abort() Signed-off-by: Tobias Ulmer --- diff --git a/local/git.lua b/local/git.lua index 05a378c..f4fbe40 100644 --- a/local/git.lua +++ b/local/git.lua @@ -123,7 +123,7 @@ local function get_revision_id(info, source, sourceset, check_remote) e2lib.logf(4, "%s: check for remote tag: match", s.name) end else - e2lib.abort("not an scm sourceset: " .. sourceset) + return false, err.new("not an scm sourceset: %s", sourceset) end if not id then fr = string.format("can't get commit id for ref %s from repository %s", @@ -347,9 +347,13 @@ function git.prepare_source(info, sourcename, sourceset, buildpath) local cmd2 = string.format("%s %s -x -C %s/%s", e2lib.shquote(tar), tarflags, e2lib.shquote(buildpath), e2lib.shquote(sourcename)) local r = e2lib.callcmd_pipe({ cmd1, cmd2 }) - if r then e2lib.abort(r) end - else e2lib.abort("invalid sourceset: ", sourceset) + if r then + return false, err.new("%s", r) + end + else + return false, err.new("invalid sourceset: %s", sourceset) end + return true, nil end