aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-09-28 10:42:02 +0200
committerGitHub <noreply@github.com>2020-09-28 10:42:02 +0200
commit649c465873b20465590d3934fdc0672e4b6b826a (patch)
treeb1c4271198634b97eda99a92b952f11f5a45fe68 /src
parent5df687c316023ad0238d557d46ed4eb74eb0dcb9 (diff)
parented218e1d6cf755fc3011c0954eb7031f95d3d732 (diff)
Merge pull request #4064 from serokell/balsoft/fix-max-jobs
Fix max-jobs option
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 83fbe89a0..629e05f3a 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1631,6 +1631,13 @@ void DerivationGoal::tryToBuild()
actLock.reset();
+ state = &DerivationGoal::tryLocalBuild;
+ worker.wakeUp(shared_from_this());
+}
+
+void DerivationGoal::tryLocalBuild() {
+ bool buildLocally = buildMode != bmNormal || parsedDrv->willBuildLocally(worker.store);
+
/* Make sure that we are allowed to start a build. If this
derivation prefers to be done locally, do it even if
maxBuildJobs is 0. */
@@ -1641,12 +1648,6 @@ void DerivationGoal::tryToBuild()
return;
}
- state = &DerivationGoal::tryLocalBuild;
- worker.wakeUp(shared_from_this());
-}
-
-void DerivationGoal::tryLocalBuild() {
-
/* If `build-users-group' is not empty, then we have to build as
one of the members of that group. */
if (settings.buildUsersGroup != "" && getuid() == 0) {