packages: Output and error ports are line-buffered in ‘patch-and-repack’.

* guix/packages.scm (patch-and-repack): Add ‘setvbuf’ calls.

Change-Id: I039bb6407263d5172bf0bc716bda6860dc2615fb
This commit is contained in:
Ludovic Courtès 2023-12-11 17:59:44 +01:00
parent 949ee85019
commit b089f95f14
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1055,6 +1055,11 @@ (define (repack directory output)
'("--no-recursion"
"--files-from=.file_list"))))
(let ((line (cond-expand (guile-2.0 _IOLBF)
(else 'line))))
(setvbuf (current-output-port) line)
(setvbuf (current-error-port) line))
;; Encoding/decoding errors shouldn't be silent.
(fluid-set! %default-port-conversion-strategy 'error)