GNU bug report logs -
#57900
[PATCH]: scripts: build: Format strings before calling display-hint.
Previous Next
Reported by: Zhu Zihao <all_but_last <at> 163.com>
Date: Sun, 18 Sep 2022 04:35:02 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <othacehe <at> gnu.org>
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 57900 in the body.
You can then email your comments to 57900 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#57900
; Package
guix-patches
.
(Sun, 18 Sep 2022 04:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Zhu Zihao <all_but_last <at> 163.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 18 Sep 2022 04:35:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi guix.
when running following command, the error message is not expected.
```
citreu <at> asus-laptop:~$ guix build hello --target=foobar
guix build: error: 'foobar' is not a supported cross-compilation target
hint: Try `--list-targets' to view available targets.~%
citreu <at> asus-laptop:~$ guix build hello --system=foobar
guix build: error: 'foobar' is not a supported system
hint: Try `--list-systems' to view available system types.~%
```
Unexpected ~% at the end of message.
In guix/scripts/build.scm, the code use display-hint to show this hint
but it doesn't format the "~%" to newline.
This patch adds these missing formats
[signature.asc (application/pgp-signature, inline)]
[0001-scripts-build-Format-strings-before-calling-display-.patch (text/x-patch, inline)]
From 13b4f55dc1f21a8ca15329d493f441d09df0ab4e Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last <at> 163.com>
Date: Sun, 18 Sep 2022 12:28:09 +0800
Subject: [PATCH] scripts: build: Format strings before calling display-hint.
* guix/scripts/build.scm(%standard-cross-build-options): format hint string.
%standard-cross-build-options: Ditto.
---
guix/scripts/build.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 06d9ad1f0c..0787dfcc9a 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -383,8 +383,9 @@ (define %standard-cross-build-options
(format #f (G_ "Did you mean @code{~a}?
Try @option{--list-targets} to view available targets.~%")
closest))
- (display-hint (G_ "\
-Try @option{--list-targets} to view available targets.~%")))
+ (display-hint
+ (format #f (G_ "\
+Try @option{--list-targets} to view available targets.~%"))))
(exit 1))))))))
(define %standard-native-build-options
@@ -409,8 +410,9 @@ (define %standard-native-build-options
(format #f (G_ "Did you mean @code{~a}?
Try @option{--list-systems} to view available system types.~%")
closest))
- (display-hint (G_ "\
-Try @option{--list-systems} to view available system types.~%")))
+ (display-hint
+ (format #f (G_ "\
+Try @option{--list-systems} to view available system types.~%"))))
(exit 1))))))))
--
2.37.3
[Message part 4 (text/plain, inline)]
--
Retrieve my PGP public key:
gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC
Zihao
Reply sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
You have taken responsibility.
(Fri, 30 Sep 2022 13:55:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Zhu Zihao <all_but_last <at> 163.com>
:
bug acknowledged by developer.
(Fri, 30 Sep 2022 13:55:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 57900-done <at> debbugs.gnu.org (full text, mbox):
> * guix/scripts/build.scm(%standard-cross-build-options): format hint string.
> %standard-cross-build-options: Ditto.
Applied, thanks!
Mathieu
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 29 Oct 2022 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.