* Propagate --max-silent-time to remote machines.
This commit is contained in:
parent
bcfe98acff
commit
9ac3f5df9c
|
@ -23,8 +23,9 @@ use English '-no_match_vars';
|
||||||
|
|
||||||
my $loadIncreased = 0;
|
my $loadIncreased = 0;
|
||||||
|
|
||||||
my ($amWilling, $localSystem, $neededSystem, $drvPath, $mustRun) = @ARGV;
|
my ($amWilling, $localSystem, $neededSystem, $drvPath, $mustRun, $maxSilentTime) = @ARGV;
|
||||||
$mustRun = 0 unless defined $mustRun;
|
$mustRun = 0 unless defined $mustRun;
|
||||||
|
$maxSilentTime = 0 unless defined $maxSilentTime;
|
||||||
|
|
||||||
sub sendReply {
|
sub sendReply {
|
||||||
my $reply = shift;
|
my $reply = shift;
|
||||||
|
@ -184,12 +185,15 @@ system("NIX_SSHOPTS=\"$sshOpts\" nix-copy-closure $hostName $maybeSign $drvPath
|
||||||
|
|
||||||
print "BUILDING...\n";
|
print "BUILDING...\n";
|
||||||
|
|
||||||
|
my $buildFlags = "";
|
||||||
|
$buildFlags .= " --max-silent-time $maxSilentTime";
|
||||||
|
|
||||||
# `-tt' forces allocation of a pseudo-terminal. This is required to
|
# `-tt' forces allocation of a pseudo-terminal. This is required to
|
||||||
# make the remote nix-store process receive a signal when the
|
# make the remote nix-store process receive a signal when the
|
||||||
# connection dies. Without it, the remote process might continue to
|
# connection dies. Without it, the remote process might continue to
|
||||||
# run indefinitely (that is, until it next tries to write to
|
# run indefinitely (that is, until it next tries to write to
|
||||||
# stdout/stderr).
|
# stdout/stderr).
|
||||||
system("ssh -tt $sshOpts $hostName 'nix-store -rvvK $drvPath'") == 0
|
system("ssh -tt $sshOpts $hostName 'nix-store -rvvK $buildFlags $drvPath'") == 0
|
||||||
or die "remote build on $hostName failed: $?";
|
or die "remote build on $hostName failed: $?";
|
||||||
|
|
||||||
print "REMOTE BUILD DONE: $drvPath on $hostName\n";
|
print "REMOTE BUILD DONE: $drvPath on $hostName\n";
|
||||||
|
|
|
@ -1301,6 +1301,7 @@ DerivationGoal::HookReply DerivationGoal::tryBuildHook()
|
||||||
drv.platform.c_str(),
|
drv.platform.c_str(),
|
||||||
drvPath.c_str(),
|
drvPath.c_str(),
|
||||||
(worker.canPostpone() ? (string) "0" : "1").c_str(),
|
(worker.canPostpone() ? (string) "0" : "1").c_str(),
|
||||||
|
(format("%1%") % maxSilentTime).str().c_str(),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
throw SysError(format("executing `%1%'") % buildHook);
|
throw SysError(format("executing `%1%'") % buildHook);
|
||||||
|
|
Loading…
Reference in a new issue