From 714084e6c08ec6226ad38655153d307a198b7a73 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 9 Mar 2014 23:13:53 +0100 Subject: offload: Honor absolute build timeouts. * guix/scripts/offload.scm (offload): Remove default value for 'build-timeout'. Pass '--timeout' to the remote 'guix build' process. (transfer-and-offload, process-request): Remove default value for 'build-timeout'. --- guix/scripts/offload.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index cb979fb929..4d2f78f711 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -256,7 +256,7 @@ (define (release-build-slot slot) (define* (offload drv machine #:key print-build-trace? (max-silent-time 3600) - (build-timeout 7200) (log-port (current-output-port))) + build-timeout (log-port (current-output-port))) "Perform DRV on MACHINE, assuming DRV and its prerequisites are available there, and write the build log to LOG-PORT. Return the exit status." (format (current-error-port) "offloading '~a' to '~a'...~%" @@ -267,9 +267,12 @@ (define* (offload drv machine ;; FIXME: Protect DRV from garbage collection on MACHINE. (let ((pipe (remote-pipe machine OPEN_READ `("guix" "build" - ;; FIXME: more options ,(format #f "--max-silent-time=~a" max-silent-time) + ,@(if build-timeout + (list (format #f "--timeout=~a" + build-timeout)) + '()) ,(derivation-file-name drv))))) (let loop ((line (read-line pipe))) (unless (eof-object? line) @@ -284,7 +287,7 @@ (define* (transfer-and-offload drv machine (inputs '()) (outputs '()) (max-silent-time 3600) - (build-timeout 7200) + build-timeout print-build-trace?) "Offload DRV to MACHINE. Prior to the actual offloading, transfer all of INPUTS to MACHINE; if building DRV succeeds, retrieve all of OUTPUTS from @@ -485,7 +488,7 @@ (define (undecorate pred) (define* (process-request wants-local? system drv features #:key print-build-trace? (max-silent-time 3600) - (build-timeout 7200)) + build-timeout) "Process a request to build DRV." (let* ((local? (and wants-local? (string=? system (%current-system)))) (reqs (build-requirements -- cgit v1.2.3