emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57900: closed ([PATCH]: scripts: build: Format strings before callin


From: GNU bug Tracking System
Subject: bug#57900: closed ([PATCH]: scripts: build: Format strings before calling display-hint.)
Date: Fri, 30 Sep 2022 13:55:02 +0000

Your message dated Fri, 30 Sep 2022 15:53:47 +0200
with message-id <878rm16k9g.fsf@gnu.org>
and subject line Re: bug#57900: [PATCH]: scripts: build: Format strings before 
calling display-hint.
has caused the debbugs.gnu.org bug report #57900,
regarding [PATCH]: scripts: build: Format strings before calling display-hint.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
57900: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57900
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH]: scripts: build: Format strings before calling display-hint. Date: Sun, 18 Sep 2022 12:31:02 +0800 User-agent: mu4e 1.8.9; emacs 29.0.50
Hi guix.

when running following command, the error message is not expected.

```
citreu@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@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

Attachment: signature.asc
Description: PGP signature

>From 13b4f55dc1f21a8ca15329d493f441d09df0ab4e Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@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

-- 
Retrieve my PGP public key:

  gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC

Zihao

--- End Message ---
--- Begin Message --- Subject: Re: bug#57900: [PATCH]: scripts: build: Format strings before calling display-hint. Date: Fri, 30 Sep 2022 15:53:47 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
> * guix/scripts/build.scm(%standard-cross-build-options): format hint string.
> %standard-cross-build-options: Ditto.

Applied, thanks!

Mathieu


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]