diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-02T21·13-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-02T21·13-0400 |
commit | 2001895f3d2668549feb60a182aa624a7b6292eb (patch) | |
tree | f555841859d53cf821bf52dc89bd4d0fe9273186 /src/libstore/local-store.hh | |
parent | cf46f194445c9abc0398dae908295dff794fee98 (diff) |
Add a --repair flag to ‘nix-store -r’ to repair derivation outputs
With this flag, if any valid derivation output is missing or corrupt, it will be recreated by using a substitute if available, or by rebuilding the derivation. The latter may use hash rewriting if chroots are not available.
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r-- | src/libstore/local-store.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index 9f1c8280a8de..00356bf9d7bf 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -150,7 +150,7 @@ public: Paths importPaths(bool requireSignature, Source & source); - void buildPaths(const PathSet & paths); + void buildPaths(const PathSet & paths, bool repair = false); void ensurePath(const Path & path); @@ -202,6 +202,10 @@ public: a substituter (if available). */ void repairPath(const Path & path); + /* Check whether the given valid path exists and has the right + contents. */ + bool pathContentsGood(const Path & path); + private: Path schemaPath; |