Merge pull request #4064 from serokell/balsoft/fix-max-jobs

Fix max-jobs option
This commit is contained in:
Eelco Dolstra 2020-09-28 10:42:02 +02:00 committed by GitHub
commit 649c465873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {