From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yD/5JgugJmOIFQAAbAwnHQ (envelope-from ) for ; Sun, 18 Sep 2022 06:35:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2BTdJgugJmN1gAEAauVa8A (envelope-from ) for ; Sun, 18 Sep 2022 06:35:23 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1AED33FFF9 for ; Sun, 18 Sep 2022 06:35:23 +0200 (CEST) Received: from localhost ([::1]:46716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZm1a-0007EI-8n for larch@yhetil.org; Sun, 18 Sep 2022 00:35:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZm1H-0007E5-Np for guix-patches@gnu.org; Sun, 18 Sep 2022 00:35:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZm1H-0004X8-1J for guix-patches@gnu.org; Sun, 18 Sep 2022 00:35:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZm1G-0002uz-Fz for guix-patches@gnu.org; Sun, 18 Sep 2022 00:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57900] [PATCH]: scripts: build: Format strings before calling display-hint. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Sep 2022 04:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57900 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57900@debbugs.gnu.org X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.166347567711180 (code B ref -1); Sun, 18 Sep 2022 04:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Sep 2022 04:34:37 +0000 Received: from localhost ([127.0.0.1]:47518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZm0q-0002uF-L4 for submit@debbugs.gnu.org; Sun, 18 Sep 2022 00:34:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:49546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZm0l-0002u5-U8 for submit@debbugs.gnu.org; Sun, 18 Sep 2022 00:34:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZm0l-0007DY-Po for guix-patches@gnu.org; Sun, 18 Sep 2022 00:34:31 -0400 Received: from mail-m973.mail.163.com ([123.126.97.3]:54043) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZm0g-0004UI-97 for guix-patches@gnu.org; Sun, 18 Sep 2022 00:34:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=fD0vG DFEuMbJF6pb+HvIdxFTW9/58FE7eF/sKHzRiN8=; b=ZJlr5ohZV9QTn6XXoMWID gCncrzHXaqZqxD/0ZETm4FzbYAJILlTeS8/7bZEihm6NR+QDIlZwXjb29MbKdUdX NgOspEFElGuBpHnccz/BopMmzuSaggY5hZJ3ttzM5Uuq1abyRdfNm2jQhraDQ3xJ MvanRuo+QnRZE0YAVuTR1I= Received: from asus-laptop (unknown [27.38.249.219]) by smtp3 (Coremail) with SMTP id G9xpCgAXlHXEnyZj6D6Weg--.58164S2; Sun, 18 Sep 2022 12:34:14 +0800 (CST) User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao Date: Sun, 18 Sep 2022 12:31:02 +0800 Message-ID: <86y1uhuwqp.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: G9xpCgAXlHXEnyZj6D6Weg--.58164S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrAr13Cr47Zw45Jw47Cw4fGrg_yoWxWFXEkr Z3t3Z5Wry5AFn7WanYva4rGryfKwn3tF18KrnIvw1Yy34kZ3Z7WayDZr97Z3WfAFWSq3W7 Zr98tF9rWr1SkjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjeHq3UUUUU== X-Originating-IP: [27.38.249.219] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBoQaAr2I0UxvalgAAsa Received-SPF: pass client-ip=123.126.97.3; envelope-from=all_but_last@163.com; helo=mail-m973.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663475723; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=PZAEzV1RQRUfhIp8olocyBWZMsO8QjXO1zdvfRmbGsw=; b=laH8IpHrRTyRkIoVXONUtX36whTIqnbulgRx1Q6Ql3DtjetT2ypoBLIru45ooBGfBVHe6u E7Y8NruMAr5UNIBre6YVhORnrvz5hbn4hUMcRUMwbsxlwrigjwEUnOEuyN3ppHdh+bU0XV FnjkGIPcoYUJvcbcU7lzPCszukDzBcpzDeh8OYHezEc/6wEzfF/HrQzmF7TqXDO+VrAS02 yVI83COQjhgWNHVT3GvfBkabs/3XZ1gWhQYas17GNShJzLnd/7F4GFHa+SfPGgtsZKmZSZ fDnJ4pXK7Gv9IZOiWL4JDQ4Qz3kd36XfnwZ15/WXr3FuQ0dCtgTvf4ARTr/1Zg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663475723; a=rsa-sha256; cv=none; b=EnXQBo6AMI5sGdCB/FLuTaDfZlO8+n8EpSDY7x/3OFISCLVeK2GWIfS9rxdwf1Q6bFPlbY qFqIXIo5irl6Cv7ViysHpyUIP7pKA2RjATeuWwiOam3mHKe7+SRbQFFY/SUhbZn0wcj8Jh /ZpAvzwiLAra5vftPrZrQvxaGNYtsq9DSbGEO7ccD3mQZ8odHH2ogKjg0UkyAl/SxIavgR 9yV+M3BqYvjY1WTTFGcrtSbPtvY8zEGgeXv0MDl+vZ1DF5zzNfXdxiMeWTFNg83EBw6nUw CahMJweB8S26/pMxt4KmpN4gxqZDa2BpYnV3CrwXKGiGq/8IcitW/zXrmJxw3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=163.com header.s=s110527 header.b=ZJlr5ohZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=163.com header.s=s110527 header.b=ZJlr5ohZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1AED33FFF9 X-Spam-Score: 5.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: sM+XSHEj6Vel --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain 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 --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQT4UAIrVkIEZilSHr2K2nJqP6LM8gUCYyafvhUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQitpyaj+izPJccQD/aNxkbzhMf96AGf9ogjtaSx9zgWXo eYRt4N2h69KR04cBAKkuCoeuiv/DK5YvH73948BbOO2W+d1uYY8Sid5/KoUE =0fDs -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-scripts-build-Format-strings-before-calling-display-.patch >From 13b4f55dc1f21a8ca15329d493f441d09df0ab4e Mon Sep 17 00:00:00 2001 From: Zhu Zihao 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 --=-=-= Content-Type: text/plain -- Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao --=-=-=--