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>2007-06-12T16·53+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-06-12T16·53+0000
commit6d1a1191b053645fa0277830524bf085a7fe0956 (patch)
tree53ad5f6484b612ace6b82224a86cbf95028ea350 /src/libstore/remote-store.cc
parent9d9e1c5c41023e03ed5069ba6fc17ad3cfeab9f4 (diff)
* Support queryDeriver() in multi-user installations.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 449a4c448f0f..820bf66ad99a 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -212,6 +212,15 @@ void RemoteStore::queryReferrers(const Path & path,
 }
 
 
+Path RemoteStore::queryDeriver(const Path & path)
+{
+    writeInt(wopQueryDeriver, to);
+    writeString(path, to);
+    processStderr();
+    return readStorePath(from);
+}
+
+
 Path RemoteStore::addToStore(const Path & _srcPath, bool fixed,
     bool recursive, string hashAlgo, PathFilter & filter)
 {
@@ -224,8 +233,7 @@ Path RemoteStore::addToStore(const Path & _srcPath, bool fixed,
     writeString(hashAlgo, to);
     dumpPath(srcPath, to, filter);
     processStderr();
-    Path path = readStorePath(from);
-    return path;
+    return readStorePath(from);
 }
 
 
@@ -238,8 +246,7 @@ Path RemoteStore::addTextToStore(const string & suffix, const string & s,
     writeStringSet(references, to);
     
     processStderr();
-    Path path = readStorePath(from);
-    return path;
+    return readStorePath(from);
 }
 
 
@@ -261,8 +268,7 @@ Path RemoteStore::importPath(bool requireSignature, Source & source)
        anyway. */
     
     processStderr(0, &source);
-    Path path = readStorePath(from);
-    return path;
+    return readStorePath(from);
 }