diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 01914e2d6..75eb6e2f1 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -238,7 +238,7 @@ void Worker::childTerminated(Goal * goal, bool wakeSleepers) void Worker::waitForBuildSlot(GoalPtr goal) { - debug("wait for build slot"); + goal->trace("wait for build slot"); bool isSubstitutionGoal = goal->jobCategory() == JobCategory::Substitution; if ((!isSubstitutionGoal && getNrLocalBuilds() < settings.maxBuildJobs) || (isSubstitutionGoal && getNrSubstitutions() < settings.maxSubstitutionJobs)) diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 2a3582ad8..8d6a8c909 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1202,7 +1202,11 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source, Finally cleanup = [&]() { if (!narRead) { NullParseSink sink; - parseDump(sink, source); + try { + parseDump(sink, source); + } catch (...) { + ignoreException(); + } } }; diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index fe1903ec6..43ce70cd2 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -982,6 +982,11 @@ void copyStorePath( RepairFlag repair, CheckSigsFlag checkSigs) { + /* Bail out early (before starting a download from srcStore) if + dstStore already has this path. */ + if (!repair && dstStore.isValidPath(storePath)) + return; + auto srcUri = srcStore.getUri(); auto dstUri = dstStore.getUri(); auto storePathS = srcStore.printStorePath(storePath);