mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 23:42:43 +01:00
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
|
|
@ -474,8 +474,9 @@ Paths RemoteStore::importPaths(bool requireSignature, Source & source)
|
|||
}
|
||||
|
||||
|
||||
void RemoteStore::buildPaths(const PathSet & drvPaths)
|
||||
void RemoteStore::buildPaths(const PathSet & drvPaths, bool repair)
|
||||
{
|
||||
if (repair) throw Error("`--repair' is not supported when building through the Nix daemon");
|
||||
openConnection();
|
||||
writeInt(wopBuildPaths, to);
|
||||
writeStrings(drvPaths, to);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue