about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-02T10·16+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-02T10·16+0200
commit174b68a2a2e9e58fa1a1a0036858a566c51684dc (patch)
treefb8af58549562a1c697474e7ea95e2ad80224747 /src/libstore/build.cc
parent70581b63633016329789872c73dc48b1d498c729 (diff)
build-hook: If there are no machines defined, quit permanently
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index a9649ea378ca..e756d3377c34 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1598,8 +1598,15 @@ HookReply DerivationGoal::tryBuildHook()
 
         debug(format("hook reply is ‘%1%’") % reply);
 
-        if (reply == "decline" || reply == "postpone")
-            return reply == "decline" ? rpDecline : rpPostpone;
+        if (reply == "decline")
+            return rpDecline;
+        else if (reply == "decline-permanently") {
+            settings.useBuildHook = false;
+            worker.hook = 0;
+            return rpDecline;
+        }
+        else if (reply == "postpone")
+            return rpPostpone;
         else if (reply != "accept")
             throw Error(format("bad hook reply ‘%1%’") % reply);