From unknown Sun Jun 15 10:54:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47295 <47295@debbugs.gnu.org> To: bug#47295 <47295@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Display 1 line instead of 3 for each substitute download Reply-To: bug#47295 <47295@debbugs.gnu.org> Date: Sun, 15 Jun 2025 17:54:45 +0000 retitle 47295 [PATCH 0/2] Display 1 line instead of 3 for each substitute d= ownload reassign 47295 guix-patches submitter 47295 Ludovic Court=C3=A8s severity 47295 normal tag 47295 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 12:34:16 2021 Received: (at submit) by debbugs.gnu.org; 21 Mar 2021 16:34:16 +0000 Received: from localhost ([127.0.0.1]:55334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO11s-0007m5-CP for submit@debbugs.gnu.org; Sun, 21 Mar 2021 12:34:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:49440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO11n-0007lv-NC for submit@debbugs.gnu.org; Sun, 21 Mar 2021 12:34:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO11n-00059H-Dp for guix-patches@gnu.org; Sun, 21 Mar 2021 12:34:11 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41855) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO11m-0001hU-DL; Sun, 21 Mar 2021 12:34:10 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38566 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lO11h-00028P-4L; Sun, 21 Mar 2021 12:34:08 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/2] Display 1 line instead of 3 for each substitute download Date: Sun, 21 Mar 2021 17:33:57 +0100 Message-Id: <20210321163357.5786-1-ludo@gnu.org> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! This change brings the number of lines printed for each substitute from 3 lines to 1, when using ‘-v1’: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -v1 vim-full poezio elixir ocaml --no-grafts 84.9 MB will be downloaded elixir-1.11.4 3.7MiB 6.8MiB/s 00:01 [##################] 100.0% ocaml-4.11.1 147.1MiB 19.7MiB/s 00:07 [##################] 100.0% poezio-0.13.1 967KiB 7.0MiB/s 00:00 [##################] 100.0% vim-full-8.2.2632 9.9MiB/s 00:01 | 12.7MiB transferred --8<---------------cut here---------------end--------------->8--- ‘-v2’ gives the equivalent of the current ‘-v1’, and ‘-v3’ gives the equivalent of the current ‘-v2’ (full build output). This change has been suggested multiple times in the past. I guess I was gently preventing it on the grounds that I like to see which substitute server I’m fetching from and whether it’s gzip/lzip/zstd. But let’s face it: not everyone is interested in those details, even I don’t care at time. ;-) It took me a while to realize, but I keep learning! Thoughts? Ludo’. Ludovic Courtès (2): substitute: Emit a single newline upon completion. status: Don't display download URLs for '--verbosity=1'. doc/guix.texi | 7 ++++--- guix/scripts/substitute.scm | 7 +++++-- guix/status.scm | 23 +++++++++++++++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) -- 2.31.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 12:56:32 2021 Received: (at 47295) by debbugs.gnu.org; 21 Mar 2021 16:56:32 +0000 Received: from localhost ([127.0.0.1]:55344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO1NQ-0008HS-Iq for submit@debbugs.gnu.org; Sun, 21 Mar 2021 12:56:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO1NK-0008HA-VO for 47295@debbugs.gnu.org; Sun, 21 Mar 2021 12:56:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41981) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1NE-00049M-UF; Sun, 21 Mar 2021 12:56:20 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38628 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lO1NE-0005cv-8T; Sun, 21 Mar 2021 12:56:20 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 47295@debbugs.gnu.org Subject: [PATCH 1/2] substitute: Emit a single newline upon completion. Date: Sun, 21 Mar 2021 17:56:03 +0100 Message-Id: <20210321165604.6426-1-ludo@gnu.org> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47295 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) The immediate effect is that, with '--verbosity=1', only two lines are displayed for each substitute, instead of two lines followed by an empty line. * guix/scripts/substitute.scm (process-substitution): Emit a single newline upon completion when PRINT-BUILD-TRACE? is true. --- guix/scripts/substitute.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index f4042906c8..d0b4ef9fc2 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -551,8 +551,11 @@ the current output port." (every (compose zero? cdr waitpid) pids) ;; Skip a line after what 'progress-reporter/file' printed, and another - ;; one to visually separate substitutions. - (display "\n\n" (current-error-port)) + ;; one to visually separate substitutions. When PRINT-BUILD-TRACE? is + ;; true, leave it up to (guix status) to prettify things. + (newline (current-error-port)) + (unless print-build-trace? + (newline (current-error-port))) ;; Check whether we got the data announced in NARINFO. (let ((actual (get-hash))) -- 2.31.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 12:56:39 2021 Received: (at 47295) by debbugs.gnu.org; 21 Mar 2021 16:56:39 +0000 Received: from localhost ([127.0.0.1]:55347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO1NW-0008Hk-Q1 for submit@debbugs.gnu.org; Sun, 21 Mar 2021 12:56:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO1NV-0008HQ-5p for 47295@debbugs.gnu.org; Sun, 21 Mar 2021 12:56:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41983) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO1NP-0004Hu-Il; Sun, 21 Mar 2021 12:56:31 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38628 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lO1NF-0005cv-6c; Sun, 21 Mar 2021 12:56:24 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 47295@debbugs.gnu.org Subject: [PATCH 2/2] status: Don't display download URLs for '--verbosity=1'. Date: Sun, 21 Mar 2021 17:56:04 +0100 Message-Id: <20210321165604.6426-2-ludo@gnu.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210321165604.6426-1-ludo@gnu.org> References: <20210321165604.6426-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47295 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) With this change, each substitute occupies a single line of output (instead of two) when using '-v1', the default for 'guix package' & co. * guix/status.scm (print-build-event): Add #:print-urls? and honor it. (print-build-event/quiet): Pass #:print-urls? #f. (print-build-event/quiet-with-urls): New procedure. (logger-for-level): Add case for LEVEL 2. * doc/guix.texi (Common Build Options): Adjust '--verbosity' documentation. --- doc/guix.texi | 7 ++++--- guix/status.scm | 23 +++++++++++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 94ecd2c247..8c6550e733 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10253,9 +10253,10 @@ guix-daemon, @option{--timeout}}). @cindex build logs, verbosity @item -v @var{level} @itemx --verbosity=@var{level} -Use the given verbosity @var{level}, an integer. Choosing 0 means that no -output is produced, 1 is for quiet output, and 2 shows all the build log -output on standard error. +Use the given verbosity @var{level}, an integer. Choosing 0 means that +no output is produced, 1 is for quiet output; 2 is similar to 1 but it +additionally displays download URLs; 3 shows all the build log output on +standard error. @item --cores=@var{n} @itemx -c @var{n} diff --git a/guix/status.scm b/guix/status.scm index d47bf1700c..362ae2882c 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -403,10 +403,12 @@ the current build phase." #:optional (port (current-error-port)) #:key (colorize? (color-output? port)) + (print-urls? #t) (print-log? #t)) "Print information about EVENT and STATUS to PORT. When COLORIZE? is true, produce colorful output. When PRINT-LOG? is true, display the build log in -addition to build events." +addition to build events. When PRINT-URLS? is true, display the URL of +substitutes being downloaded." (define info (if colorize? (cute colorize-string <> (color BOLD)) @@ -526,9 +528,10 @@ addition to build events." (format port (info (G_ "substituting ~a...")) item) (newline port))) (('download-started item uri _ ...) - (erase-current-line*) - (format port (info (G_ "downloading from ~a ...")) uri) - (newline port)) + (when print-urls? + (erase-current-line*) + (format port (info (G_ "downloading from ~a ...")) uri) + (newline port))) (('download-progress item uri (= string->number size) (= string->number transferred)) @@ -602,6 +605,17 @@ addition to build events." (colorize? (color-output? port))) (print-build-event event old-status status port #:colorize? colorize? + #:print-urls? #f + #:print-log? #f)) + +(define* (print-build-event/quiet-with-urls event old-status status + #:optional + (port (current-error-port)) + #:key + (colorize? (color-output? port))) + (print-build-event event old-status status port + #:colorize? colorize? + #:print-urls? #t ;show download URLs #:print-log? #f)) (define* (build-status-updater #:optional (on-change (const #t))) @@ -787,6 +801,7 @@ evaluate EXP... in that context." "Return the logging procedure that corresponds to LEVEL." (cond ((<= level 0) (const #t)) ((= level 1) print-build-event/quiet) + ((= level 2) print-build-event/quiet-with-urls) (else print-build-event))) (define (call-with-status-verbosity level thunk) -- 2.31.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 31 10:05:24 2021 Received: (at 47295-done) by debbugs.gnu.org; 31 Mar 2021 14:05:24 +0000 Received: from localhost ([127.0.0.1]:55024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRbTI-000436-0W for submit@debbugs.gnu.org; Wed, 31 Mar 2021 10:05:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRbTF-00042e-Ep for 47295-done@debbugs.gnu.org; Wed, 31 Mar 2021 10:05:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60398) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRbTA-0000fU-9G for 47295-done@debbugs.gnu.org; Wed, 31 Mar 2021 10:05:16 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54912 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lRbT8-0005Ae-Ld for 47295-done@debbugs.gnu.org; Wed, 31 Mar 2021 10:05:15 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 47295-done@debbugs.gnu.org Subject: Re: bug#47295: [PATCH 0/2] Display 1 line instead of 3 for each substitute download References: <20210321163357.5786-1-ludo@gnu.org> Date: Wed, 31 Mar 2021 16:05:13 +0200 In-Reply-To: <20210321163357.5786-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s=22's?= message of "Sun, 21 Mar 2021 17:33:57 +0100") Message-ID: <87wntn8lly.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47295-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Ludovic Court=C3=A8s skribis: > This change brings the number of lines printed for each substitute > from 3 lines to 1, when using =E2=80=98-v1=E2=80=99: > > $ ./pre-inst-env guix build -v1 vim-full poezio elixir ocaml --no-grafts > 84.9 MB will be downloaded > elixir-1.11.4 3.7MiB 6.8MiB/s 00:01 [####= ##############] 100.0% > ocaml-4.11.1 147.1MiB 19.7MiB/s 00:07 [####= ##############] 100.0% > poezio-0.13.1 967KiB 7.0MiB/s 00:00 [####= ##############] 100.0% > vim-full-8.2.2632 9.9MiB/s 00:01= | 12.7MiB transferred > > =E2=80=98-v2=E2=80=99 gives the equivalent of the current =E2=80=98-v1=E2= =80=99, and =E2=80=98-v3=E2=80=99 gives > the equivalent of the current =E2=80=98-v2=E2=80=99 (full build output). Pushed as e45ef9a648c155c35b51e6b15049a1bd5416f0a1. I=E2=80=99ll follow up with an update of the =E2=80=98guix=E2=80=99 package= for the (guix scripts substitute) part. Thanks, Ludo=E2=80=99. From unknown Sun Jun 15 10:54:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Apr 2021 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator