summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/worker-protocol.hh2
-rw-r--r--nix/nix-daemon/guix-daemon.cc5
-rw-r--r--nix/nix-daemon/nix-daemon.cc16
3 files changed, 16 insertions, 7 deletions
diff --git a/nix/libstore/worker-protocol.hh b/nix/libstore/worker-protocol.hh
index bdeaca2e3a..efe9eadf23 100644
--- a/nix/libstore/worker-protocol.hh
+++ b/nix/libstore/worker-protocol.hh
@@ -6,7 +6,7 @@ namespace nix {
#define WORKER_MAGIC_1 0x6e697863
#define WORKER_MAGIC_2 0x6478696f
-#define PROTOCOL_VERSION 0x160
+#define PROTOCOL_VERSION 0x161
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index d5d33a587a..aa47a290d2 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -1,5 +1,5 @@
/* GNU Guix --- Functional package management for GNU
- Copyright (C) 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+ Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
This file is part of GNU Guix.
@@ -301,8 +301,9 @@ main (int argc, char *argv[])
/* Turn automatic deduplication on by default. */
settings.autoOptimiseStore = true;
- /* Default to using as many cores as possible. */
+ /* Default to using as many cores as possible and one job at a time. */
settings.buildCores = 0;
+ settings.maxBuildJobs = 1;
argvSaved = argv;
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc
index 47b67d5863..79580ffb48 100644
--- a/nix/nix-daemon/nix-daemon.cc
+++ b/nix/nix-daemon/nix-daemon.cc
@@ -549,8 +549,12 @@ static void performOp(bool trusted, unsigned int clientVersion,
settings.keepGoing = readInt(from) != 0;
settings.set("build-fallback", readInt(from) ? "true" : "false");
verbosity = (Verbosity) readInt(from);
- settings.set("build-max-jobs", std::to_string(readInt(from)));
- settings.set("build-max-silent-time", std::to_string(readInt(from)));
+
+ if (GET_PROTOCOL_MINOR(clientVersion) < 0x61) {
+ settings.set("build-max-jobs", std::to_string(readInt(from)));
+ settings.set("build-max-silent-time", std::to_string(readInt(from)));
+ }
+
if (GET_PROTOCOL_MINOR(clientVersion) >= 2)
settings.useBuildHook = readInt(from) != 0;
if (GET_PROTOCOL_MINOR(clientVersion) >= 4) {
@@ -558,7 +562,8 @@ static void performOp(bool trusted, unsigned int clientVersion,
logType = (LogType) readInt(from);
settings.printBuildTrace = readInt(from) != 0;
}
- if (GET_PROTOCOL_MINOR(clientVersion) >= 6)
+ 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");
@@ -567,7 +572,10 @@ static void performOp(bool trusted, unsigned int clientVersion,
for (unsigned int i = 0; i < n; i++) {
string name = readString(from);
string value = readString(from);
- if (name == "build-timeout" || name == "build-repeat" || name == "use-ssh-substituter")
+ if (name == "build-timeout" || name == "build-max-silent-time"
+ || name == "build-max-jobs" || name == "build-cores"
+ || name == "build-repeat"
+ || name == "use-ssh-substituter")
settings.set(name, value);
else
settings.set(trusted ? name : "untrusted-" + name, value);