From c370755583d7350f4b96136eb0a6a8a7b08551b1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 16 Nov 2007 16:15:26 +0000 Subject: * 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). --- src/libstore/remote-store.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/libstore/remote-store.cc') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 4d866071b181..cc847c050484 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; } -- cgit 1.4.1