GNU bug report logs -
#32711
[PATCH] ui: Fix abort on #\nul character in build output.
Previous Next
Reported by: ericbavier <at> centurylink.net
Date: Wed, 12 Sep 2018 02:45:01 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32711 in the body.
You can then email your comments to 32711 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#32711
; Package
guix-patches
.
(Wed, 12 Sep 2018 02:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ericbavier <at> centurylink.net
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 12 Sep 2018 02:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Eric Bavier <bavier <at> member.fsf.org>
Fixes build of "lz4" package, e.g.
* guix/ui.scm (build-output-port)[handle-string]: Check for #\nul before doing
any regex matching.
---
guix/ui.scm | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index c55ae7e2f..207aba8ad 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1762,18 +1762,19 @@ phase announcements and replaces any other output with a spinner."
RED BLUE RED BLUE RED BLUE))))
(lambda (str)
(let ((processed
- (any (match-lambda
- ((pattern #:transform transform)
- (and=> (string-match pattern str)
- transform))
- ((pattern . colors)
- (and=> (string-match pattern str)
- (lambda (m)
- (let ((substrings
- (map (cut match:substring m <>)
- (iota (- (match:count m) 1) 1))))
- (string-join (map proc substrings colors) ""))))))
- rules)))
+ (and (not (string-index str #\nul)) ;(ice-9 regex) cannot handle #\nul
+ (any (match-lambda
+ ((pattern #:transform transform)
+ (and=> (string-match pattern str)
+ transform))
+ ((pattern . colors)
+ (and=> (string-match pattern str)
+ (lambda (m)
+ (let ((substrings
+ (map (cut match:substring m <>)
+ (iota (- (match:count m) 1) 1))))
+ (string-join (map proc substrings colors) ""))))))
+ rules))))
(when spun?
(display (string #\backspace) port))
(if processed
--
2.18.0
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Fri, 28 Sep 2018 21:15:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
ericbavier <at> centurylink.net
:
bug acknowledged by developer.
(Fri, 28 Sep 2018 21:15:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 32711-done <at> debbugs.gnu.org (full text, mbox):
Hi Eric,
ericbavier <at> centurylink.net skribis:
> From: Eric Bavier <bavier <at> member.fsf.org>
>
> Fixes build of "lz4" package, e.g.
>
> * guix/ui.scm (build-output-port)[handle-string]: Check for #\nul before doing
> any regex matching.
This is fixed in the new (guix status) code, commit
dc0f74e5fc26977a3ee6c4f2aa74a141f4359982 (see the ‘color-rules’ macro.)
Thank you, and sorry for not responding earlier!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 27 Oct 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 182 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.