aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build/worker.cc2
-rw-r--r--src/libstore/local-store.cc6
-rw-r--r--src/libstore/store-api.cc5
3 files changed, 11 insertions, 2 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc
index 850df5f1e..d6bcba3ff 100644
--- a/src/libstore/build/worker.cc
+++ b/src/libstore/build/worker.cc
@@ -250,7 +250,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 554e13e3d..78ca79c89 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -1203,7 +1203,11 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source,
Finally cleanup = [&]() {
if (!narRead) {
ParseSink 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 958691256..b787ac2f2 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -1069,6 +1069,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);