summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-11-16 16:15:26 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-11-16 16:15:26 +0000
commitc370755583d7350f4b96136eb0a6a8a7b08551b1 (patch)
tree6e42f14440963847a4b71a142b4ace2a2523b279 /src/libstore/remote-store.cc
parentc05783ad67ee95b5dd76d160efedc23b3acb0905 (diff)
downloadguix-c370755583d7350f4b96136eb0a6a8a7b08551b1.tar.gz
* Flag `--no-build-hook' to disable distributed builds.
* queryDeriver in daemon mode: don't barf if the other side returns an
  empty string (which means there is no deriver).

Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 4d866071b1..cc847c0504 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -59,7 +59,7 @@ RemoteStore::RemoteStore()
         unsigned int magic = readInt(from);
         if (magic != WORKER_MAGIC_2) throw Error("protocol mismatch");
 
-        unsigned int daemonVersion = readInt(from);
+        daemonVersion = readInt(from);
         if (GET_PROTOCOL_MAJOR(daemonVersion) != GET_PROTOCOL_MAJOR(PROTOCOL_VERSION))
             throw Error("Nix daemon protocol version not supported");
         writeInt(PROTOCOL_VERSION, to);
@@ -169,6 +169,8 @@ void RemoteStore::setOptions()
     writeInt(verbosity, to);
     writeInt(maxBuildJobs, to);
     writeInt(maxSilentTime, to);
+    if (GET_PROTOCOL_MINOR(daemonVersion) >= 2)
+        writeInt(useBuildHook, to);
     processStderr();
 }
 
@@ -230,7 +232,9 @@ Path RemoteStore::queryDeriver(const Path & path)
     writeInt(wopQueryDeriver, to);
     writeString(path, to);
     processStderr();
-    return readStorePath(from);
+    Path drvPath = readString(from);
+    if (drvPath != "") assertStorePath(drvPath);
+    return drvPath;
 }