From unknown Sat Jun 14 21:30:54 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0. Resent-From: ericbavier@centurylink.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Oct 2018 01:54:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33012 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33012@debbugs.gnu.org Cc: Eric Bavier X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153922281923927 (code B ref -1); Thu, 11 Oct 2018 01:54:04 +0000 Received: (at submit) by debbugs.gnu.org; 11 Oct 2018 01:53:39 +0000 Received: from localhost ([127.0.0.1]:44012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAQAV-0006Dm-AS for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAQAQ-0006DI-M4 for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAQAK-0000r2-Qw for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, MIME_QP_LONG_LINE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55949) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAQAK-0000qm-NG for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:28 -0400 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 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1539222804; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=11zBEr5ilfcP9EtwlOwj9MeSEkE=; b=OajhE9ZZDqYh5kpX4I3vOBfpakmIT86kQolTk9SyY/GyQ4VbhHcLkw85Y6YlELtL q+jxyTIfzrsXErkR3k6P6MFmPD2i5TteUuXzRtTG+4KSVveW5zFR5v4zgdPPKDPw k/Kpsz9pIux9BXKRnwG2BsXSR80XwkKL1Lwyjtl6xbqxSmtuPSu54k9U+Cwcx1pJ GOzL9NjV3gKESKGQqXdtcVK17/L49NBOAAQz3B1P1aTBIrIXFDIdeJUFnYqWMULH uGHZJ4mMlnghKAJTWVVBzn7X68jZcy2z9ne4noo6FRHYTSqJDYAZ10UPNEHwXDom HC8hPTWpGLeoi4m/3lSszA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.2 cv=Ed6Ke7uC c=1 sm=1 tr=0 a=oDbTcMPAvYtLRnXVMdBpQQ==:117 a=oDbTcMPAvYtLRnXVMdBpQQ==:17 a=KGjhK52YXX0A:10 a=IkcTkHD0fZMA:10 a=smKx5t2vBNcA:10 a=zSv6zi-ZgakA:10 a=kBl-OI3rAAAA:8 a=6YUXDC3p20Lyojc17pYA:9 a=QEXdDO2ut3YA:10 a=pLxN2xGgR0OPbCgNAGn6:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp03.onyx.dfw.sync.lan smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.105.198] ([97.116.105.198:38056] helo=localhost.localdomain) by smtp.centurylink.net (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=DHE-RSA-AES128-GCM-SHA256) id 59/71-11303-41DAEBB5; 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> X-Mailer: git-send-email 2.19.0 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-Length: 1660 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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 From unknown Sat Jun 14 21:30:54 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 14 Oct 2018 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33012 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ericbavier@centurylink.net Cc: Eric Bavier , 33012@debbugs.gnu.org Received: via spool by 33012-submit@debbugs.gnu.org id=B33012.153955342012659 (code B ref 33012); Sun, 14 Oct 2018 21:44:02 +0000 Received: (at 33012) by debbugs.gnu.org; 14 Oct 2018 21:43:40 +0000 Received: from localhost ([127.0.0.1]:49638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBoAl-0003I4-RA for submit@debbugs.gnu.org; Sun, 14 Oct 2018 17:43:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gBoAk-0003Hp-H7 for 33012@debbugs.gnu.org; Sun, 14 Oct 2018 17:43:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBoAe-00039v-Nw for 33012@debbugs.gnu.org; Sun, 14 Oct 2018 17:43:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBoAc-00038Q-Am; Sun, 14 Oct 2018 17:43:30 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57048 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gBoAb-0000Ar-8D; Sun, 14 Oct 2018 17:43:30 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20181011015246.24964-1-ericbavier@centurylink.net> <20181011015246.24964-4-ericbavier@centurylink.net> Date: Sun, 14 Oct 2018 23:43:28 +0200 In-Reply-To: <20181011015246.24964-4-ericbavier@centurylink.net> (ericbavier's message of "Wed, 10 Oct 2018 20:52:46 -0500") Message-ID: <875zy4dx1b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) ericbavier@centurylink.net skribis: > 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 "?" in place of REPLACEMENT CHARACTER. LGTM, thanks! Ludo'. From unknown Sat Jun 14 21:30:54 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: ericbavier@centurylink.net Subject: bug#33012: closed (Re: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0.) Message-ID: References: <20181016173123.1d333201@centurylink.net> <20181011015246.24964-4-ericbavier@centurylink.net> X-Gnu-PR-Message: they-closed 33012 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 33012@debbugs.gnu.org Date: Tue, 16 Oct 2018 22:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1539729122-23297-1" This is a multi-part message in MIME format... ------------=_1539729122-23297-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #33012: [PATCH 3/3] ui: Fix port-buffering with guile@2.0. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 33012@debbugs.gnu.org. --=20 33012: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33012 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1539729122-23297-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 33012-done) by debbugs.gnu.org; 16 Oct 2018 22:31:35 +0000 Received: from localhost ([127.0.0.1]:54053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXsF-00062l-3r for submit@debbugs.gnu.org; Tue, 16 Oct 2018 18:31:35 -0400 Received: from mail.onyx.syn-alias.com ([206.152.134.66]:59316 helo=smtp.centurylink.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCXsD-00062V-9s for 33012-done@debbugs.gnu.org; Tue, 16 Oct 2018 18:31:33 -0400 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1539729087; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=PQGr3xgVox6nDPkzppEa2lNXhWI=; b=rnF3djgs/LmXRNSl5JhgZlL5IG9n6sU2lwJjEVeS8gGBj0nl6t+GLeueglCmNlKe PNEe4NGvsHEazxX02eBworYYYWiJ1MlskyhiULH3yLfJWmSYbelfzfyilbghcuEL VANKdbl4Advh2dft/VWBJdaYzrKxPM1CRMYC3sq+x0faWHpLeJOqbfySxTvV650g r3dxX4b6kzFP5QqBeebXIqIho6FevxtdmqMz4dpw1MgruRPokjoamWdLsXOmZ0u2 QmfrohvU91gEcF1kMYwtEfFxExqBQ0gUMcGTj+gNcfqjSssJJNvrmU+5cKmR9bw5 nAe+Mlq7tUSTo0txnz8uIA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.2 cv=Me0ugN3f c=1 sm=1 tr=0 a=MhzntBxPsQQsyKet5jur4A==:117 a=MhzntBxPsQQsyKet5jur4A==:17 a=KGjhK52YXX0A:10 a=smKx5t2vBNcA:10 a=zSv6zi-ZgakA:10 a=mDV3o1hIAAAA:8 a=I_5RNyk1AAAA:8 a=kBl-OI3rAAAA:8 a=2CwcsI3xKlrBrC_t8jkA:9 a=QEXdDO2ut3YA:10 a=06xMS8KP7YHvG70QacEA:9 a=_FVE-zBwftR9WsbkzFJk:22 a=Eh9yxdLE6B1twWrs3SXz:22 a=pLxN2xGgR0OPbCgNAGn6:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp02.onyx.dfw.sync.lan smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.181.145] ([97.116.181.145:47702] helo=localhost) by smtp.centurylink.net (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=AES256-GCM-SHA384) id F8/EB-30023-FB666CB5; Tue, 16 Oct 2018 18:31:27 -0400 Date: Tue, 16 Oct 2018 17:31:23 -0500 From: Eric Bavier To: 33012-done@debbugs.gnu.org Subject: Re: [bug#33012] [PATCH 3/3] ui: Fix port-buffering with guile@2.0. Message-ID: <20181016173123.1d333201@centurylink.net> In-Reply-To: <875zy4dx1b.fsf@gnu.org> References: <20181011015246.24964-1-ericbavier@centurylink.net> <20181011015246.24964-4-ericbavier@centurylink.net> <875zy4dx1b.fsf@gnu.org> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/Fs8pJk7JLxFuC9v7gmOVJr1"; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33012-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Sig_/Fs8pJk7JLxFuC9v7gmOVJr1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 14 Oct 2018 23:43:28 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > ericbavier@centurylink.net skribis: >=20 > > From: Eric Bavier > > > > * guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'se= tvbuf' > > on custom binary port. > > * tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2= .0]: > > Use "?" in place of REPLACEMENT CHARACTER. =20 >=20 > LGTM, thanks! >=20 > Ludo'. Pushed in 278f86a43f1561b1c064ce88da012db414ec7efc --Sig_/Fs8pJk7JLxFuC9v7gmOVJr1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEoMXjUi7471xkzbfw/XPKxxnTJWYFAlvGZrsACgkQ/XPKxxnT JWZmhBAAluIdWRXG2oK9Q66NKGH0AHR7c0oVvhJB+MBarJJ0N84KcgpK5Lb/5Zkg oYl6ChIiY3UizFQuHN++3n5tzgdIMdKfYuIShxjKnvQFcGzeUXRzSpAsBYUcn+d0 ISroHvZcPXOt28Vxsd2eOKWkDpjI4DXfWduR+dOPGPjJapshKJeNxEqmYjlSLGDk x/bG5wK2T2bY/Yn2nzDXSpB99Z/hMbaJ0qagbv2yrCRM6EbCtMNHevhnjJCFmmc7 w3n+SguQFEo7CaUNIUOatvC/kTvRuTRrTwPaFquTWUElBgwtlmH8w12BTmSl/Hqf nWlQp9PypeaCKSL4+YAhbqpflCQndUHasD91TYOcy6q+jsomaYKIw24UPwpseE4J +FZ2ElLUdKAt1P+bTDMtmP0As9S3Z1jSJRedeRexTvs2aAa7PEKzxVvAKDDLdYCw BmZd8G3CGQ+ksm/SHXbxidr6x+RbdXHA1l5yrEFmc1p/mRlGAAAcKBDmflzKqVoy 3gcHchGadDnTwq9O5/MHtrSqSxMdF27RW8Qmr9dqTE/IiPtuTTAKjpXB3w92NmsP 8Re8fN/puW4nqSaIKEdXBwtZCm0GMc+Jy6PtKPRI1GFkdZ7sK4PnIMZBqHkJqreI kqpIqHXWw6WczkL3QojzXvAU/mpKqlbS6AUaZY7IIfjJw2qVLRA= =eE2w -----END PGP SIGNATURE----- --Sig_/Fs8pJk7JLxFuC9v7gmOVJr1-- ------------=_1539729122-23297-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Oct 2018 01:53:39 +0000 Received: from localhost ([127.0.0.1]:44012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAQAV-0006Dm-AS for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAQAQ-0006DI-M4 for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAQAK-0000r2-Qw for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, MIME_QP_LONG_LINE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55949) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAQAK-0000qm-NG for submit@debbugs.gnu.org; Wed, 10 Oct 2018 21:53:28 -0400 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 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1539222804; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=11zBEr5ilfcP9EtwlOwj9MeSEkE=; b=OajhE9ZZDqYh5kpX4I3vOBfpakmIT86kQolTk9SyY/GyQ4VbhHcLkw85Y6YlELtL q+jxyTIfzrsXErkR3k6P6MFmPD2i5TteUuXzRtTG+4KSVveW5zFR5v4zgdPPKDPw k/Kpsz9pIux9BXKRnwG2BsXSR80XwkKL1Lwyjtl6xbqxSmtuPSu54k9U+Cwcx1pJ GOzL9NjV3gKESKGQqXdtcVK17/L49NBOAAQz3B1P1aTBIrIXFDIdeJUFnYqWMULH uGHZJ4mMlnghKAJTWVVBzn7X68jZcy2z9ne4noo6FRHYTSqJDYAZ10UPNEHwXDom HC8hPTWpGLeoi4m/3lSszA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.2 cv=Ed6Ke7uC c=1 sm=1 tr=0 a=oDbTcMPAvYtLRnXVMdBpQQ==:117 a=oDbTcMPAvYtLRnXVMdBpQQ==:17 a=KGjhK52YXX0A:10 a=IkcTkHD0fZMA:10 a=smKx5t2vBNcA:10 a=zSv6zi-ZgakA:10 a=kBl-OI3rAAAA:8 a=6YUXDC3p20Lyojc17pYA:9 a=QEXdDO2ut3YA:10 a=pLxN2xGgR0OPbCgNAGn6:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp03.onyx.dfw.sync.lan smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.105.198] ([97.116.105.198:38056] helo=localhost.localdomain) by smtp.centurylink.net (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=DHE-RSA-AES128-GCM-SHA256) id 59/71-11303-41DAEBB5; Wed, 10 Oct 2018 21:53:24 -0400 From: ericbavier@centurylink.net To: guix-patches@gnu.org Subject: [PATCH 3/3] ui: Fix port-buffering with guile@2.0. Date: Wed, 10 Oct 2018 20:52:46 -0500 Message-Id: <20181011015246.24964-4-ericbavier@centurylink.net> X-Mailer: git-send-email 2.19.0 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-Length: 1660 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Eric Bavier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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 ------------=_1539729122-23297-1--