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>2010-05-04T10·45+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-05-04T10·45+0000
commitf92c9a0ac585d30e245c6667cbce4b035659cb11 (patch)
tree4c9d10130d3ce67a4ca724170614f09a404e16aa /src/libstore/remote-store.cc
parent7fa338f4bac16f83b65b95fb0397b534d5ba5d5b (diff)
* Allow unprivileged users to do `nix-store --clear-failed-paths' and
  `nix-store --query-failed-paths'.

Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index c5d7975b52..334ad95cf9 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -451,6 +451,25 @@ void RemoteStore::collectGarbage(const GCOptions & options, GCResults & results)
 }
 
 
+PathSet RemoteStore::queryFailedPaths()
+{
+    openConnection();
+    writeInt(wopQueryFailedPaths, to);
+    processStderr();
+    return readStorePaths(from);
+}
+
+
+void RemoteStore::clearFailedPaths(const PathSet & paths)
+{
+    openConnection();
+    writeInt(wopClearFailedPaths, to);
+    writeStringSet(paths, to);
+    processStderr();
+    readInt(from);
+}
+
+
 void RemoteStore::processStderr(Sink * sink, Source * source)
 {
     unsigned int msg;