From 03427e76f11fe1d918020d28bdb69b2fb348ee96 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Aug 2008 11:44:50 +0000 Subject: * querySubstitutablePathInfo: work properly when run via the daemon. * --dry-run: print the paths that we don't know how to build/substitute. --- src/nix-worker/nix-worker.cc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/nix-worker/nix-worker.cc') diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index d8d86434ea95..377f2be73aee 100644 --- a/src/nix-worker/nix-worker.cc +++ b/src/nix-worker/nix-worker.cc @@ -430,7 +430,21 @@ static void performOp(unsigned int clientVersion, stopWork(); break; } - + + case wopQuerySubstitutablePathInfo: { + Path path = absPath(readString(from)); + startWork(); + SubstitutablePathInfo info; + bool res = store->querySubstitutablePathInfo(path, info); + stopWork(); + writeInt(res ? 1 : 0, to); + if (res) { + writeString(info.deriver, to); + writeStringSet(info.references, to); + writeLongLong(info.downloadSize, to); + } + break; + } default: throw Error(format("invalid operation %1%") % op); @@ -440,7 +454,7 @@ static void performOp(unsigned int clientVersion, static void processConnection() { - RemoveTempRoots removeTempRoots; /* unused variable - don't remove */ + RemoveTempRoots removeTempRoots __attribute__((unused)); canSendStderr = false; myPid = getpid(); -- cgit 1.4.1