aboutsummaryrefslogtreecommitdiff
path: root/src/build-remote/build-remote.cc
diff options
context:
space:
mode:
authorYorick van Pelt <yorick@yorickvanpelt.nl>2023-02-06 17:53:03 +0100
committerYorick van Pelt <yorick@yorickvanpelt.nl>2023-02-06 17:53:03 +0100
commit3050005211951a1053e79634b1eb2fee1ad30a90 (patch)
tree37027b5e5a4abe456cefc711f5871f045aba2b9a /src/build-remote/build-remote.cc
parent895dfc656a21f6252ddf48df0d1f215effa04ecb (diff)
build-remote: don't warn when all local build slots are taken
Previously, build-remote would show a warning if all build slots were taken, even if they would open up later. This caused a lot of spam in the logs. Disable this warning when maxJobs > 0. See #6263
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r--src/build-remote/build-remote.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 6b81ecc49..e197af847 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -112,10 +112,14 @@ static int main_build_remote(int argc, char * * argv)
drvPath = store->parseStorePath(readString(source));
auto requiredFeatures = readStrings<std::set<std::string>>(source);
- auto canBuildLocally = amWilling
+ /* It would be possible to build locally after some builds clear out,
+ so don't show the warning now: */
+ bool couldBuildLocally = settings.maxBuildJobs > 0
&& ( neededSystem == settings.thisSystem
|| settings.extraPlatforms.get().count(neededSystem) > 0)
&& allSupportedLocally(*store, requiredFeatures);
+ /* It's possible to build this locally right now: */
+ bool canBuildLocally = amWilling && couldBuildLocally;
/* Error ignored here, will be caught later */
mkdir(currentLoad.c_str(), 0777);
@@ -214,7 +218,7 @@ static int main_build_remote(int argc, char * * argv)
% concatStringsSep<StringSet>(", ", m.supportedFeatures)
% concatStringsSep<StringSet>(", ", m.mandatoryFeatures);
- printMsg(canBuildLocally ? lvlChatty : lvlWarn, error);
+ printMsg(couldBuildLocally ? lvlChatty : lvlWarn, error);
std::cerr << "# decline\n";
}