diff options
author | Rickard Nilsson <rickynils@gmail.com> | 2021-01-13 10:13:51 +0100 |
---|---|---|
committer | Rickard Nilsson <rickynils@gmail.com> | 2021-01-13 10:13:51 +0100 |
commit | 0ca1a5013269060919393afaa708640f574ab350 (patch) | |
tree | 505a6b2c796d099b5c72547ee5944daf9dcb7cdc /src | |
parent | 44fd7a05b655315fa0e6156ac33a1c5624460968 (diff) |
Remove a redundant condition in DerivationGoal::tryLocalBuild()
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 35f365795..415a55d37 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -679,13 +679,9 @@ void DerivationGoal::tryToBuild() } 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. */ + /* Make sure that we are allowed to start a build. */ unsigned int curBuilds = worker.getNrLocalBuilds(); - if (curBuilds >= settings.maxBuildJobs && !(buildLocally && curBuilds == 0)) { + if (curBuilds >= settings.maxBuildJobs) { worker.waitForBuildSlot(shared_from_this()); outputLocks.unlock(); return; |