mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
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
This commit is contained in:
parent
895dfc656a
commit
3050005211
1 changed files with 6 additions and 2 deletions
|
@ -112,10 +112,14 @@ static int main_build_remote(int argc, char * * argv)
|
||||||
drvPath = store->parseStorePath(readString(source));
|
drvPath = store->parseStorePath(readString(source));
|
||||||
auto requiredFeatures = readStrings<std::set<std::string>>(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
|
&& ( neededSystem == settings.thisSystem
|
||||||
|| settings.extraPlatforms.get().count(neededSystem) > 0)
|
|| settings.extraPlatforms.get().count(neededSystem) > 0)
|
||||||
&& allSupportedLocally(*store, requiredFeatures);
|
&& allSupportedLocally(*store, requiredFeatures);
|
||||||
|
/* It's possible to build this locally right now: */
|
||||||
|
bool canBuildLocally = amWilling && couldBuildLocally;
|
||||||
|
|
||||||
/* Error ignored here, will be caught later */
|
/* Error ignored here, will be caught later */
|
||||||
mkdir(currentLoad.c_str(), 0777);
|
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.supportedFeatures)
|
||||||
% concatStringsSep<StringSet>(", ", m.mandatoryFeatures);
|
% concatStringsSep<StringSet>(", ", m.mandatoryFeatures);
|
||||||
|
|
||||||
printMsg(canBuildLocally ? lvlChatty : lvlWarn, error);
|
printMsg(couldBuildLocally ? lvlChatty : lvlWarn, error);
|
||||||
|
|
||||||
std::cerr << "# decline\n";
|
std::cerr << "# decline\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue