diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-12 15:42:19 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-30 15:18:12 +0200 |
commit | b66ab6cdbce5f4ac2db8976872547680242166e8 (patch) | |
tree | d18eeea5ee95602bf3fe252ee97708f0899e1610 | |
parent | 3be2e71ab31200e3d263d6d2aeb4bf85462156a0 (diff) |
Fix repair during substitution
-rw-r--r-- | src/libstore/build.cc | 3 | ||||
-rw-r--r-- | src/libstore/store-api.cc | 4 | ||||
-rw-r--r-- | src/libstore/store-api.hh | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 81c79435e..a6f8dfaba 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -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 (...) { diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 8600def62..f39d6b547 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -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); } diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index f680e951f..65c4cdc97 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -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 |