nix-store --serve: Suppress log output on stderr when repeating a build
This commit is contained in:
parent
6069b946ad
commit
7a3e7d0e61
3 changed files with 8 additions and 1 deletions
|
@ -3047,7 +3047,8 @@ void DerivationGoal::handleEOF(int fd)
|
||||||
|
|
||||||
void DerivationGoal::flushLine()
|
void DerivationGoal::flushLine()
|
||||||
{
|
{
|
||||||
if (settings.verboseBuild)
|
if (settings.verboseBuild &&
|
||||||
|
(settings.printRepeatedBuilds || curRound == 1))
|
||||||
printError(filterANSIEscapes(currentLogLine, true));
|
printError(filterANSIEscapes(currentLogLine, true));
|
||||||
else {
|
else {
|
||||||
logTail.push_back(currentLogLine);
|
logTail.push_back(currentLogLine);
|
||||||
|
|
|
@ -149,6 +149,11 @@ struct Settings {
|
||||||
before being killed (0 means no limit). */
|
before being killed (0 means no limit). */
|
||||||
unsigned long maxLogSize;
|
unsigned long maxLogSize;
|
||||||
|
|
||||||
|
/* When build-repeat > 0 and verboseBuild == true, whether to
|
||||||
|
print repeated builds (i.e. builds other than the first one) to
|
||||||
|
stderr. Hack to prevent Hydra logs from being polluted. */
|
||||||
|
bool printRepeatedBuilds = true;
|
||||||
|
|
||||||
/* How often (in seconds) to poll for locks. */
|
/* How often (in seconds) to poll for locks. */
|
||||||
unsigned int pollInterval;
|
unsigned int pollInterval;
|
||||||
|
|
||||||
|
|
|
@ -842,6 +842,7 @@ static void opServe(Strings opFlags, Strings opArgs)
|
||||||
settings.maxLogSize = readInt(in);
|
settings.maxLogSize = readInt(in);
|
||||||
if (GET_PROTOCOL_MINOR(clientVersion) >= 3)
|
if (GET_PROTOCOL_MINOR(clientVersion) >= 3)
|
||||||
settings.set("build-repeat", std::to_string(readInt(in)));
|
settings.set("build-repeat", std::to_string(readInt(in)));
|
||||||
|
settings.printRepeatedBuilds = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Reference in a new issue