]> git.e2factory.org Git - e2factory.git/commitdiff
git: remove e2lib.abort()
authorTobias Ulmer <tu@emlix.com>
Mon, 15 Apr 2013 17:35:36 +0000 (19:35 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 13:58:55 +0000 (14:58 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/git.lua

index 05a378c67bb2de1e24ef6203c56680cfd07a9b68..f4fbe407042ca1320c9484ebc40ab047c0f523e5 100644 (file)
@@ -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