Fix repair during substitution
This commit is contained in:
parent
3be2e71ab3
commit
b66ab6cdbc
3 changed files with 5 additions and 4 deletions
|
@ -3198,7 +3198,8 @@ void SubstitutionGoal::tryToRun()
|
|||
/* Wake up the worker loop when we're done. */
|
||||
Finally updateStats([this]() { outPipe.writeSide.close(); });
|
||||
|
||||
copyStorePath(ref<Store>(sub), ref<Store>(worker.store.shared_from_this()), storePath);
|
||||
copyStorePath(ref<Store>(sub), ref<Store>(worker.store.shared_from_this()),
|
||||
storePath, repair);
|
||||
|
||||
promise.set_value();
|
||||
} catch (...) {
|
||||
|
|
|
@ -358,14 +358,14 @@ const Store::Stats & Store::getStats()
|
|||
|
||||
|
||||
void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
|
||||
const Path & storePath)
|
||||
const Path & storePath, bool repair)
|
||||
{
|
||||
auto info = srcStore->queryPathInfo(storePath);
|
||||
|
||||
StringSink sink;
|
||||
srcStore->narFromPath({storePath}, sink);
|
||||
|
||||
dstStore->addToStore(*info, *sink.s);
|
||||
dstStore->addToStore(*info, *sink.s, repair);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ Path computeStorePathForText(const string & name, const string & s,
|
|||
|
||||
/* Copy a path from one store to another. */
|
||||
void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
|
||||
const Path & storePath);
|
||||
const Path & storePath, bool repair = false);
|
||||
|
||||
|
||||
/* Remove the temporary roots file for this process. Any temporary
|
||||
|
|
Loading…
Reference in a new issue