summaryrefslogtreecommitdiff
path: root/nix/libstore/remote-store.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-12 11:42:12 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-12 11:48:46 +0100
commite82e55e58c67b0215e768c4612ca542bc670f633 (patch)
tree856c4512fa1fbde59c1d9845c5a763ef8c4a14b4 /nix/libstore/remote-store.cc
parent98bd851ee891ca4a84e061fe1e78ba78c292b096 (diff)
parente35dff973375266db253747140ddf25084ecddc2 (diff)
downloadguix-patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar
guix-patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libstore/remote-store.cc')
-rw-r--r--nix/libstore/remote-store.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/nix/libstore/remote-store.cc b/nix/libstore/remote-store.cc
index 0539bbe127..324ef5eb30 100644
--- a/nix/libstore/remote-store.cc
+++ b/nix/libstore/remote-store.cc
@@ -462,11 +462,18 @@ Paths RemoteStore::importPaths(bool requireSignature, Source & source)
void RemoteStore::buildPaths(const PathSet & drvPaths, BuildMode buildMode)
{
- if (buildMode != bmNormal) throw Error("repairing or checking is not supported when building through the Nix daemon");
openConnection();
writeInt(wopBuildPaths, to);
- if (GET_PROTOCOL_MINOR(daemonVersion) >= 13)
+ if (GET_PROTOCOL_MINOR(daemonVersion) >= 13) {
writeStrings(drvPaths, to);
+ if (GET_PROTOCOL_MINOR(daemonVersion) >= 15) {
+ writeInt(buildMode, to);
+ }
+ /* Old daemons did not take a 'buildMode' parameter, so we need to
+ validate it here on the client side. */
+ else if (buildMode != bmNormal) throw Error("repairing or checking \
+is not supported when building through the Nix daemon");
+ }
else {
/* For backwards compatibility with old daemons, strip output
identifiers. */