From patchwork Thu Feb 10 22:16:51 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: 235 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 6CDBA27BBEA; Thu, 10 Feb 2022 22:18:10 +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 3AB3E27BBE9 for ; Thu, 10 Feb 2022 22:18:10 +0000 (GMT) Received: from localhost ([::1]:40618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIHlR-0004oH-Co for patchwork@mira.cbaines.net; Thu, 10 Feb 2022 17:18:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIHlL-0004lY-0f for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIHlK-00060I-NL for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nIHlK-0008CE-Fv for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53933] [PATCH 1/3] status: Do not print .drv file names for grafts. References: <20220210220836.22022-1-ludo@gnu.org> In-Reply-To: <20220210220836.22022-1-ludo@gnu.org> 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.164453144031433 (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]:57414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHkd-0008Au-JU for submit@debbugs.gnu.org; Thu, 10 Feb 2022 17:17:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHkb-0008AQ-Qg for 53933@debbugs.gnu.org; Thu, 10 Feb 2022 17:17:18 -0500 Received: from [2001:470:142:3::e] (port=38436 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 1nIHkK-0005qy-Gr; 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:Date:Subject:To:From:in-reply-to: references; bh=Iq5AEDtUzcClJFC33z+fLrBPimWSpUmxcNU8KeTcnxY=; b=W5ezITxe4BtjLo wzafqC5hSnoGHklIBO8pRTu47ubCbXtdhGAILWawf1eOrV4C7UcJecx1hvbh5eHcGsocr8DSv2mFp nXI6u6Oo4l2KsZc5OLlALGlsCYYKqmSVnp0Tdl5h6Zudu/0NGI5SKOVrwKvNM70OArhiwNrTiKfpa LKGR0FiiyYaw/2wuoUkLt1S0GjVTlxNlejRyFN2X5OR3qApQoZzE7vtKDVpq2CVOMDQAwhxi9s/la Ugb+T5g+SNvK1p30GbDTQke2tEAVEKbr9CPzy20nHW+nX7fCGqHPGTWhQGs5yS1L+ZmNWpjkm1lge 1fXBOSdJQvN21UAw6Aqw==; 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-3q; Thu, 10 Feb 2022 17:17:00 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 10 Feb 2022 23:16:51 +0100 Message-Id: <20220210221653.22208-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 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 With this change, "guix build vim-full" prints: applying 15 grafts for vim-full-8.2.4306 ... instead of showing /gnu/store/…-vim-full-8.2.4306.drv. * guix/status.scm (print-build-event): In the 'graft' case, print just the "package name" part of DRV. --- guix/status.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/status.scm b/guix/status.scm index fba28765df..868f6d6296 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2017-2022 Ludovic Courtès ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. @@ -483,7 +483,9 @@ (define erase-current-line* (format port (info (N_ "applying ~a graft for ~a ..." "applying ~a grafts for ~a ..." count)) - count drv))) + count + (string-drop-right (store-path-package-name drv) + (string-length ".drv"))))) ('profile (let ((count (match (assq-ref properties 'profile) (#f 0) 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: 236 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?) From patchwork Thu Feb 10 22:16:53 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: 237 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 8BE4827BBEA; Thu, 10 Feb 2022 22:19:10 +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 522A427BBE9 for ; Thu, 10 Feb 2022 22:19:10 +0000 (GMT) Received: from localhost ([::1]:42608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIHmP-0006Ay-Gz for patchwork@mira.cbaines.net; Thu, 10 Feb 2022 17:19:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIHlL-0004mm-MK for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIHlL-00060i-Cj 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 1nIHlL-0008CT-9l for guix-patches@gnu.org; Thu, 10 Feb 2022 17:18:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53933] [PATCH 3/3] status: Do not pass a non-literal format string to 'format'. 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:03 +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.164453144331452 (code B ref 53933); Thu, 10 Feb 2022 22:18:03 +0000 Received: (at 53933) by debbugs.gnu.org; 10 Feb 2022 22:17:23 +0000 Received: from localhost ([127.0.0.1]:57418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHkh-0008BE-A5 for submit@debbugs.gnu.org; Thu, 10 Feb 2022 17:17:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHkb-0008AR-Qm for 53933@debbugs.gnu.org; Thu, 10 Feb 2022 17:17:18 -0500 Received: from [2001:470:142:3::e] (port=38440 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-0005rz-Ss; 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=2f1VYeTi45m+8cK0wd+oWDDdoBGUIPmagI+UHQydF68=; b=BAEoPupCWqYCBrWjTD1i SlPbIHPfx49MYs7ZZRotHq/DTAzh/QNhi+YhagxpLew4sbwotwBqki/3Z2tOpx7nD94HI2UgpiMeC Za2xSF8o7UtZR7oEQeQcZeHxe0go8/FdlgUVy4S3SMmeOif7Z/+nuX9HTxVoqN4WoG8xX3OD13Z2i ph+6L3vh/tkIjsdXqJAMMAfDrv4LNW0CCTUkqqPncSYzHtT3mSnY+Il7b2USAa+UWMBod9m0xcwVp lJJ3s59elsZD6hGKsO+FKS9bqMdBSXGQ9bwYMxecDwfoE1AtvxvJ6KcQfF1EHGV4pHCn+7zLUHXpd /eoDlCjIEcc3Lg==; 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 1nIHkL-0007Lk-HF; Thu, 10 Feb 2022 17:17:01 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 10 Feb 2022 23:16:53 +0100 Message-Id: <20220210221653.22208-3-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 * guix/status.scm (print-build-event): Use 'display' instead of 'format' for hooks. --- guix/status.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/status.scm b/guix/status.scm index 5b903372f1..b8905c9542 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -503,7 +503,7 @@ (define erase-current-line* (let ((hook-type (assq-ref properties 'hook))) (or (and=> (hook-message hook-type) (lambda (msg) - (format port (info msg)))) + (display (info msg) port))) (format port (info (G_ "running profile hook of type '~a'...")) hook-type)))) (_