From patchwork Thu Feb 10 22:16:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 37173 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 94E2F27BBEA; Thu, 10 Feb 2022 22:19:02 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 4AA8127BBE9 for ; Thu, 10 Feb 2022 22:19:02 +0000 (GMT) Received: from localhost ([::1]:42400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIHmH-00061g-FX for patchwork@mira.cbaines.net; Thu, 10 Feb 2022 17:19:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIHlL-0004m6-B1 for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIHlL-00060N-0k for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nIHlK-0008CL-Tf for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53933] [PATCH 2/3] status: Use bold more sparsely at -v1. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Feb 2022 22:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53933 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53933@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 53933-submit@debbugs.gnu.org id=B53933.164453144031439 (code B ref 53933); Thu, 10 Feb 2022 22:18:02 +0000 Received: (at 53933) by debbugs.gnu.org; 10 Feb 2022 22:17:20 +0000 Received: from localhost ([127.0.0.1]:57416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHkd-0008Aw-Sn for submit@debbugs.gnu.org; Thu, 10 Feb 2022 17:17:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHkb-0008AP-QP for 53933@debbugs.gnu.org; Thu, 10 Feb 2022 17:17:18 -0500 Received: from [2001:470:142:3::e] (port=38438 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 1nIHkL-0005r4-8T; Thu, 10 Feb 2022 17:17:12 -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=AbqfGxZtlPDo/elDFN466lBX99NZrsWpjHLsklu4Eas=; b=ZWlL/tOdjN4dZp+TPjw+ o9S1+lUZHsY1ggm9vXKkLz8TrPQY2jzPGVmO82P4RRIyHaaczIXivo+EJlP8PleNsw6CUofkZFp5V KHaA5n7tLrbpJ95dYnFWXjdo157yIQ20Jnu9/PhRB6+7AZ7UyliesqQ+gC7YaSbIIJArsI+0/Wo+h q4gJmUKy/q85O+8TxBP3JntkLq1mOF7cKIqd2bMMQieKUj6Gj1tsX+vKDmctTBFJ93RtyWjGsKz37 UJgUl75T/orXEhLAFW2NGiAJ03ffk5y7ymoWfWfEEnO1lqCWlCnIWMz/VQPAgHm4b9pbOy/1PGp4X JDa4KkDu111r8A==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41412 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 1nIHkK-0007Lk-Ps; Thu, 10 Feb 2022 17:17:01 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 10 Feb 2022 23:16:52 +0100 Message-Id: <20220210221653.22208-2-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220210221653.22208-1-ludo@gnu.org> References: <20220210221653.22208-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 Until now, at -v1, all the "apply N grafts" messages (for instance) would be displayed in bold. This would typically result in several subsequent lines all bold, although none of them is particularly interesting. This improves on that by avoiding bold at -v1 for these messages. * guix/status.scm (print-build-event)[emph]: New variable. Use it for the "View build log", "expected hash", and "offloading build" messages. [info]: Default to 'identity' when PRINT-URLS? and PRINT-LOG? are both false. --- guix/status.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/guix/status.scm b/guix/status.scm index 868f6d6296..5b903372f1 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -414,6 +414,11 @@ (define* (print-build-event event old-status status addition to build events. When PRINT-URLS? is true, display the URL of substitutes being downloaded." (define info + (if (and colorize? (or print-urls? print-log?)) + (cute colorize-string <> (color BOLD)) + identity)) + + (define emph (if colorize? (cute colorize-string <> (color BOLD)) identity)) @@ -526,7 +531,7 @@ (define erase-current-line* (format port (failure (G_ "Could not find build log for '~a'.")) drv)) (log - (format port (info (G_ "View build log at '~a'.")) log))) + (format port (emph (G_ "View build log at '~a'.")) log))) (newline port)) (('substituter-started item _ ...) (erase-current-line*) @@ -577,12 +582,12 @@ (define erase-current-line* ;; /gnu/store/…-sth:", where "sha256" is the hash algorithm. (format port (failure (G_ "~a hash mismatch for ~a:")) algo item) (newline port) - (format port (info (G_ "\ + (format port (emph (G_ "\ expected hash: ~a actual hash: ~a~%")) expected actual)) (('build-remote drv host _ ...) - (format port (info (G_ "offloading build of ~a to '~a'")) drv host) + (format port (emph (G_ "offloading build of ~a to '~a'")) drv host) (newline port)) (('build-log pid line) (if (multiplexed-output-supported?)