From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAQAv-0007S6-Kf for guix-patches@gnu.org; Wed, 10 Oct 2018 21:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAQAu-0001RQ-L3 for guix-patches@gnu.org; Wed, 10 Oct 2018 21:54:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:39760) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAQAu-0001RB-EV for guix-patches@gnu.org; Wed, 10 Oct 2018 21:54:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gAQAu-0006FC-DA for guix-patches@gnu.org; Wed, 10 Oct 2018 21:54:04 -0400 Subject: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAQAJ-0007Pi-V0 for guix-patches@gnu.org; Wed, 10 Oct 2018 21:53:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAQAG-0000l8-Qn for guix-patches@gnu.org; Wed, 10 Oct 2018 21:53:27 -0400 Received: from mail.onyx.syn-alias.com ([206.152.134.66]:44951 helo=smtp.centurylink.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAQAG-0000fS-LJ for guix-patches@gnu.org; Wed, 10 Oct 2018 21:53:24 -0400 From: ericbavier@centurylink.net Date: Wed, 10 Oct 2018 20:52:46 -0500 Message-Id: <20181011015246.24964-4-ericbavier@centurylink.net> In-Reply-To: <20181011015246.24964-1-ericbavier@centurylink.net> References: <20181011015246.24964-1-ericbavier@centurylink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33012@debbugs.gnu.org Cc: Eric Bavier From: Eric Bavier * guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'setvbuf' on custom binary port. * tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2.0]: Use "=3F" in place of REPLACEMENT CHARACTER. --- guix/status.scm | 5 +++-- tests/status.scm | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/guix/status.scm b/guix/status.scm index 13537c70c..6dba7e049 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -502,8 +502,9 @@ The second return value is a thunk to retrieve the current state." ;; The build port actually receives Unicode strings. (set-port-encoding! port "UTF-8") - (setvbuf port (cond-expand (guile-2.2 'line) (else _IOLBF))) - + (cond-expand + ((and guile-2 (not guile-2.2)) #t) + (else (setvbuf port 'line))) (values port (lambda () %state))) (define (call-with-status-report on-event thunk) diff --git a/tests/status.scm b/tests/status.scm index 486ad04dd..846a6f415 100644 --- a/tests/status.scm +++ b/tests/status.scm @@ -124,7 +124,10 @@ (test-equal "current-build-output-port, UTF-8 + garbage" ;; What about a mixture of UTF-8 + garbage=3F - '((build-log "garbage: =EF=BF=BDlambda: =CE=BB\n")) + (let ((replacement (cond-expand + ((and guile-2 (not guile-2.2)) "=3F") + (else "=EF=BF=BD")))) + `((build-log ,(string-append "garbage: " replacement "lambda: =CE=BB\n")))) (let-values (((port get-status) (build-event-output-port cons '()))) (display "garbage: " port) (put-bytevector port #vu8(128)) -- 2.19.0