From patchwork Wed Mar 9 10:12:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 37697 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1CD9027BBEA; Wed, 9 Mar 2022 10:13:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 985E127BBE9 for ; Wed, 9 Mar 2022 10:13:34 +0000 (GMT) Received: from localhost ([::1]:37004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRtK1-0002t6-N5 for patchwork@mira.cbaines.net; Wed, 09 Mar 2022 05:13:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRtJW-0002oO-LB for guix-patches@gnu.org; Wed, 09 Mar 2022 05:13:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRtJW-0004oD-BF for guix-patches@gnu.org; Wed, 09 Mar 2022 05:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRtJW-0003JR-0y for guix-patches@gnu.org; Wed, 09 Mar 2022 05:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54307] [PATCH 2/2] ui: 'show-what-to-build' highlights "would be downloaded" headings. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Mar 2022 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54307@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 54307-submit@debbugs.gnu.org id=B54307.164682077812711 (code B ref 54307); Wed, 09 Mar 2022 10:13:01 +0000 Received: (at 54307) by debbugs.gnu.org; 9 Mar 2022 10:12:58 +0000 Received: from localhost ([127.0.0.1]:58600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRtJS-0003Iu-D9 for submit@debbugs.gnu.org; Wed, 09 Mar 2022 05:12:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRtJQ-0003IZ-Ua for 54307@debbugs.gnu.org; Wed, 09 Mar 2022 05:12:57 -0500 Received: from [2001:470:142:3::e] (port=32936 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRtJG-0004m5-0I; Wed, 09 Mar 2022 05:12:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=U6C2aisN+Ks3fFBlQfyCGHmpRXc+AmhnMajhgo/Q3bA=; b=T/yTVguf3Rp1aCkJKCEO zjUou6P2EB0+DpXWxf0QJ/sFvTPg+MmQZ9L0yGu6+FqjcZv2IyHKp2bFK3Xrmmen9p8AYe3yecz7C qRESuCtB1DOWlFAk83X2eVkKdk8n29JcVL+O+MifKWlEwt+jr+S3pc4i2GDNzfjaAsHfc/x/wrkoh OtYjypLU5PCBfrLdPl3YbYxYg028GcykTL3HZtPgausgo2YwBK4aAJniFk0sWsWR/8WoZAH3p2XdI 1vgwxl9tVThdCfW7p+qUAa9yhOIx7IQDi7DsgHn3ivU3XCwyx/yA1KqL5yo0vAgvAwvNjqNvyIqg1 U/h5t0KSi5r2Cw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52476 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRtJE-0002ig-PZ; Wed, 09 Mar 2022 05:12:44 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 9 Mar 2022 11:12:34 +0100 Message-Id: <20220309101234.24236-2-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220309101234.24236-1-ludo@gnu.org> References: <20220309101234.24236-1-ludo@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/ui.scm (show-what-to-build): Highlight "X MB would be downloaded". --- guix/ui.scm | 74 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 8e4e3e2dfc..6c194eb3c9 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1041,21 +1041,28 @@ (define display-download-size? (map colorized-store-item build))) (cond ((>= verbosity 2) (if display-download-size? - (format (current-error-port) - ;; TRANSLATORS: "MB" is for "megabyte"; it should be - ;; translated to the corresponding abbreviation. - (G_ "~:[~,1h MB would be downloaded:~%~{ ~a~%~}~;~]") - (null? download) - download-size - (map (compose colorized-store-item substitutable-path) - download)) - (format (current-error-port) - (N_ "~:[The following file would be downloaded:~%~{ ~a~%~}~;~]" - "~:[The following files would be downloaded:~%~{ ~a~%~}~;~]" - (length download)) - (null? download) - (map (compose colorized-store-item substitutable-path) - download))) + (begin + (format (current-error-port) + (highlight + ;; TRANSLATORS: "MB" is for "megabyte"; it + ;; should be translated to the corresponding + ;; abbreviation. + (G_ "~:[~,1h MB would be downloaded:~%~;~]")) + (null? download) + download-size) + (format (current-error-port) "~{ ~a~%~}" + (map (compose colorized-store-item substitutable-path) + download))) + (begin + (format (current-error-port) + (highlight + (N_ "~:[The following file would be downloaded:~%~;~]" + "~:[The following files would be downloaded:~%~;~]" + (length download))) + (null? download)) + (format (current-error-port) "~{ ~a~%~}" + (map (compose colorized-store-item substitutable-path) + download)))) (format (current-error-port) (N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]" "~:[The following grafts would be made:~%~{ ~a~%~}~;~]" @@ -1094,21 +1101,28 @@ (define display-download-size? (map colorized-store-item build))) (cond ((>= verbosity 2) (if display-download-size? - (format (current-error-port) - ;; TRANSLATORS: "MB" is for "megabyte"; it should be - ;; translated to the corresponding abbreviation. - (G_ "~:[~,1h MB will be downloaded:~%~{ ~a~%~}~;~]") - (null? download) - download-size - (map (compose colorized-store-item substitutable-path) - download)) - (format (current-error-port) - (N_ "~:[The following file will be downloaded:~%~{ ~a~%~}~;~]" - "~:[The following files will be downloaded:~%~{ ~a~%~}~;~]" - (length download)) - (null? download) - (map (compose colorized-store-item substitutable-path) - download))) + (begin + (format (current-error-port) + (highlight + ;; TRANSLATORS: "MB" is for "megabyte"; it + ;; should be translated to the corresponding + ;; abbreviation. + (G_ "~:[~,1h MB will be downloaded:~%~;~]")) + (null? download) + download-size) + (format (current-error-port) "~{ ~a~%~}" + (map (compose colorized-store-item substitutable-path) + download))) + (begin + (format (current-error-port) + (highlight + (N_ "~:[The following file will be downloaded:~%~;~]" + "~:[The following files will be downloaded:~%~;~]" + (length download))) + (null? download)) + (format (current-error-port) "~{ ~a~%~}" + (map (compose colorized-store-item substitutable-path) + download)))) (format (current-error-port) (N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]" "~:[The following grafts will be made:~%~{ ~a~%~}~;~]"