about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-08-04T11·44+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-08-04T11·44+0000
commit03427e76f11fe1d918020d28bdb69b2fb348ee96 (patch)
treea9628150b6c2943e1fa99fd03f7fcf4b30ec7bf4 /src/libstore/remote-store.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/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index b7e60043d640..bc04c8adb9ab 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -216,7 +216,16 @@ bool RemoteStore::hasSubstitutes(const Path & path)
 bool RemoteStore::querySubstitutablePathInfo(const Path & path,
     SubstitutablePathInfo & info)
 {
-    throw Error("not implemented");
+    writeInt(wopQuerySubstitutablePathInfo, to);
+    writeString(path, to);
+    processStderr();
+    unsigned int reply = readInt(from);
+    if (reply == 0) return false;
+    info.deriver = readString(from);
+    if (info.deriver != "") assertStorePath(info.deriver);
+    info.references = readStorePaths(from);
+    info.downloadSize = readLongLong(from);
+    return true;
 }