about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T19·09-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03T19·09-0400
commit0a7084567fc4e7d077863075a7ea1bb82d843341 (patch)
tree4868d450da1e153b0660eede85105cb2b14d0859 /src/libstore/remote-store.cc
parenta807edfae8428bf426ee6ae849a7a24d74d39202 (diff)
Add a ‘--repair’ flag to nix-instantiate
This allows repairing corrupted derivations and other source files.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 2a895593b25c..08e409d3f058 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -419,8 +419,10 @@ Path RemoteStore::queryPathFromHashPart(const string & hashPart)
 
 
 Path RemoteStore::addToStore(const Path & _srcPath,
-    bool recursive, HashType hashAlgo, PathFilter & filter)
+    bool recursive, HashType hashAlgo, PathFilter & filter, bool repair)
 {
+    if (repair) throw Error("repairing is not supported when building through the Nix daemon");
+
     openConnection();
 
     Path srcPath(absPath(_srcPath));
@@ -438,8 +440,10 @@ Path RemoteStore::addToStore(const Path & _srcPath,
 
 
 Path RemoteStore::addTextToStore(const string & name, const string & s,
-    const PathSet & references)
+    const PathSet & references, bool repair)
 {
+    if (repair) throw Error("repairing is not supported when building through the Nix daemon");
+
     openConnection();
     writeInt(wopAddTextToStore, to);
     writeString(name, to);
@@ -476,7 +480,7 @@ Paths RemoteStore::importPaths(bool requireSignature, Source & source)
 
 void RemoteStore::buildPaths(const PathSet & drvPaths, bool repair)
 {
-    if (repair) throw Error("`--repair' is not supported when building through the Nix daemon");
+    if (repair) throw Error("repairing is not supported when building through the Nix daemon");
     openConnection();
     writeInt(wopBuildPaths, to);
     writeStrings(drvPaths, to);