diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-09-17 16:17:20 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-09-17 16:27:15 +0200 |
commit | 9ff87bb99614923fa3336ab4bbf22e3444709b48 (patch) | |
tree | fa169a6cc0fdc8d92bb4c4a4f265afc2ba29a890 /nix/nix-daemon/nix-daemon.cc | |
parent | ae71bef532d6b1c9d1481a3ac65827f148b1e45b (diff) | |
parent | 9e8e252026f558933bdd9cfc26a75d13954b3e8e (diff) | |
download | guix-9ff87bb99614923fa3336ab4bbf22e3444709b48.tar guix-9ff87bb99614923fa3336ab4bbf22e3444709b48.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/nix-daemon/nix-daemon.cc')
-rw-r--r-- | nix/nix-daemon/nix-daemon.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 56137701a1..1163a249d1 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -1,3 +1,4 @@ +#include "config.h" #include "shared.hh" #include "local-store.hh" #include "util.hh" @@ -580,8 +581,14 @@ static void performOp(bool trusted, unsigned int clientVersion, settings.set("build-max-silent-time", std::to_string(readInt(from))); } - if (GET_PROTOCOL_MINOR(clientVersion) >= 2) + if (GET_PROTOCOL_MINOR(clientVersion) >= 2) { +#ifdef HAVE_DAEMON_OFFLOAD_HOOK settings.useBuildHook = readInt(from) != 0; +#else + readInt(from); // ignore the user's setting +#endif + } + if (GET_PROTOCOL_MINOR(clientVersion) >= 4) { settings.buildVerbosity = (Verbosity) readInt(from); logType = (LogType) readInt(from); @@ -590,8 +597,12 @@ static void performOp(bool trusted, unsigned int clientVersion, if (GET_PROTOCOL_MINOR(clientVersion) >= 6 && GET_PROTOCOL_MINOR(clientVersion) < 0x61) settings.set("build-cores", std::to_string(readInt(from))); - if (GET_PROTOCOL_MINOR(clientVersion) >= 10) - settings.set("build-use-substitutes", readInt(from) ? "true" : "false"); + if (GET_PROTOCOL_MINOR(clientVersion) >= 10) { + if (settings.useSubstitutes) + settings.set("build-use-substitutes", readInt(from) ? "true" : "false"); + else + readInt(from); // substitutes remain disabled + } if (GET_PROTOCOL_MINOR(clientVersion) >= 12) { unsigned int n = readInt(from); for (unsigned int i = 0; i < n; i++) { |