From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +HCZKlSPBWKNGgEAgWs5BA (envelope-from ) for ; Thu, 10 Feb 2022 23:19:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UEf1J1SPBWLyRAAA9RJhRA (envelope-from ) for ; Thu, 10 Feb 2022 23:19:00 +0100 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 641573DD89 for ; Thu, 10 Feb 2022 23:19:00 +0100 (CET) Received: from localhost ([::1]:42400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIHmE-00061g-Iv for larch@yhetil.org; Thu, 10 Feb 2022 17:18:58 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644531540; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=AbqfGxZtlPDo/elDFN466lBX99NZrsWpjHLsklu4Eas=; b=DibqNVmE55lQtQ/SoIc18xqs9CYA1eu96zJgrI81pqmoYGq3e9J1E1DrF+Q7gjj9eY3mx+ MuT0cgJUjNpCBj/9xm1+AuuxBCFW6iZSRGb64Q9M7ZcrZF6FPizDlnSxQd1aUUZPr+CIsc 7Wum0sfefRwqDlzGqmRu6avq10iQgVHld+JzM8Q663/+OMz2NkpactI5KbY5qc+W8sVwhP NpKpB6xxpVEEK4LRQ7So6ZxuEOkFRRNqU07EHmT5MhqrIJvWdGxZz1qBx1/sDqKAaZ3x2J y4NvRBJ3U+m80W3HHRzP4HKRr4XJhwm35uN536PWgDkAjD2U52KYaHnSKNASTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644531540; a=rsa-sha256; cv=none; b=DXQNR9VqTgMgYl8gUzjrdqzgR6RL6PFh0Oe+uOfB/ED1TZpppF45Jmvrr0o8L59fR4ad1m 1VvlvnlMUot2/ygewz84g/VqBjcEpdOl4tCBV2oJP0mmKjivVoFsNt7C1ZZdgtkaybtdPN 3vBNXIrONqJ5U2Cly6FEPOMlpXBD4mG0U0l/Diu3BzpdmmQXn175JB6DfW7O7SYaWE+J3i aevydfU66QMjunkTo4fzMAHZ5quLg5A2lBUfWuMKllFf/PDocQPW4MqWhSb7lUJIP/ziDl rX6/qt8oIs3c7l0JL15Ze06TAD0bHw1RrqlmBrdR9X4otTTaSbcyZb/5FRUdHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="ZWlL/tOd"; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="ZWlL/tOd"; dmarc=pass (policy=none) header.from=gnu.org; 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: 641573DD89 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: FMcdXiQjZgp7 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?) -- 2.34.0