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.
This commit is contained in:
parent
cf46f19444
commit
2001895f3d
7 changed files with 116 additions and 64 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue