aboutsummaryrefslogtreecommitdiff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-08-04 11:44:50 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-08-04 11:44:50 +0000
commit03427e76f11fe1d918020d28bdb69b2fb348ee96 (patch)
treea9628150b6c2943e1fa99fd03f7fcf4b30ec7bf4 /src/nix-worker/nix-worker.cc
parentb3c26180e33856f16e1e5ceea30b951065b4ebc1 (diff)
* querySubstitutablePathInfo: work properly when run via the daemon.
* --dry-run: print the paths that we don't know how to build/substitute.
Diffstat (limited to 'src/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index d8d86434e..377f2be73 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();