Subject: [PATCH core-updates 5/6] packages: Output and error ports are line-buffered in ‘patch-and-repack’.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 14 Dec 2023 14:37:41 +0100

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

Change-Id: I039bb6407263d5172bf0bc716bda6860dc2615fb
---
 guix/packages.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/guix/packages.scm b/guix/packages.scm
index 4b0c478ff4..cb8db925f8 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1007,6 +1007,11 @@ (define* (patch-and-repack source patches
                          '("--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)
 
-- 
2.41.0