From 36b5851df6d0833a7cf64673a65564afa5dd5ccc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Mon, 31 Mar 2014 10:57:28 +0200
Subject: [PATCH] offload: Exit with code 100 upon build failures.

* guix/scripts/offload.scm (transfer-and-offload): Exit with code 100
  upon build failure.
---
 guix/scripts/offload.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index d06dd744a81..187f1d44c1f 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -350,7 +350,10 @@ (define* (transfer-and-offload drv machine
                     (derivation-file-name drv)
                     (build-machine-name machine)
                     (status:exit-val status))
-            (primitive-exit (status:exit-val status)))))))
+
+            ;; Use exit code 100 for a permanent build failure.  The daemon
+            ;; interprets other non-zero codes as transient build failures.
+            (primitive-exit 100))))))
 
 (define (send-files files machine)
   "Send the subset of FILES that's missing to MACHINE's store.  Return #t on
-- 
GitLab