daemon: When repairing, rebuild if there is no substituter.
This commit is contained in:
parent
1a9574e3a7
commit
c56cd90cc9
|
@ -3482,9 +3482,18 @@ void LocalStore::repairPath(const Path & path)
|
|||
|
||||
worker.run(goals);
|
||||
|
||||
if (goal->getExitCode() != Goal::ecSuccess)
|
||||
if (goal->getExitCode() != Goal::ecSuccess) {
|
||||
/* Since substituting the path didn't work, if we have a valid
|
||||
deriver, then rebuild the deriver. */
|
||||
Path deriver = queryDeriver(path);
|
||||
if (deriver != "" && isValidPath(deriver)) {
|
||||
goals.clear();
|
||||
goals.insert(worker.makeDerivationGoal(deriver, StringSet(), bmRepair));
|
||||
worker.run(goals);
|
||||
} else
|
||||
throw Error(format("cannot repair path `%1%'") % path, worker.exitStatus());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue