about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-02T19·04-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-02T19·12-0400
commit8e3a7bd71253f02eb1a9fbb996166727b1283887 (patch)
tree622c2de46ea29a6d42defc50b65112c5b6022138 /src/libstore/local-store.hh
parent9958bd6992e2b3e7bacb493a372d17d5a5b95d90 (diff)
nix-store --verify: Add an option ‘--repair’ to repair all missing/corrupt paths
Also, return a non-zero exit code if errors remain after
verifying/repairing.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 80db10de10d0..9f1c8280a8de 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -171,8 +171,9 @@ public:
     /* Optimise a single store path. */
     void optimisePath(const Path & path);
 
-    /* Check the integrity of the Nix store. */
-    void verifyStore(bool checkContents);
+    /* Check the integrity of the Nix store.  Returns true if errors
+       remain. */
+    bool verifyStore(bool checkContents, bool repair);
 
     /* Register the validity of a path, i.e., that `path' exists, that
        the paths referenced by it exists, and in the case of an output
@@ -250,7 +251,7 @@ private:
     void invalidatePathChecked(const Path & path);
 
     void verifyPath(const Path & path, const PathSet & store,
-        PathSet & done, PathSet & validPaths);
+        PathSet & done, PathSet & validPaths, bool repair, bool & errors);
 
     void updatePathInfo(const ValidPathInfo & info);