public inbox for buildbot@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Mark Wielaard <mark@klomp.org>, Sam James <sam@gentoo.org>
Cc: Simon Marchi <simon.marchi@efficios.com>, buildbot@sourceware.org
Subject: Re: [PATCH 0/8] Some changes to autoregen.py
Date: Mon, 11 Mar 2024 21:53:40 -0400	[thread overview]
Message-ID: <0d0dc333-0359-4e49-9197-01bf636b4351@simark.ca> (raw)
In-Reply-To: <20240311215237.GH30331@gnu.wildebeest.org>



On 2024-03-11 17:52, Mark Wielaard wrote:
> I think it is a little too verbose now. Printing the ENV seems a bit
> busy. But for being clear what exactly is happening I guess it is nice.

Well, my initial implementation didn't show the env, but I made it show
it to be accurate.  But we could print the env only once at the
beginning.

Here's a patch that does it.


From 0ea23b4d42ae9c026f9d0dc5030a1bf38b4ccfcc Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@polymtl.ca>
Date: Mon, 11 Mar 2024 21:47:28 -0400
Subject: [PATCH] auroregen.py: print environment only once at the beginning

Reduce the duplication in the output a bit by printing the environment
variables passed to all commands only once at the beginning.

Note that the previous code ended up putting {ENV} twice in the command,
which is harmless but unnecessary.
---
 builder/containers/autoregen.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/builder/containers/autoregen.py b/builder/containers/autoregen.py
index ba77320c7248..ac16f54f6caa 100755
--- a/builder/containers/autoregen.py
+++ b/builder/containers/autoregen.py
@@ -46,7 +46,6 @@ SKIP_DIRS = [
 #
 # Print the command on stdout prior to running it.
 def run_shell(cmd: str):
-    cmd = f"{ENV} {cmd}"
     print(f"+ {cmd}")
     res = subprocess.run(
         f"{ENV} {cmd}",
@@ -63,6 +62,8 @@ run_shell(f"{AUTOMAKE_BIN} --version")
 run_shell(f"{ACLOCAL_BIN} --version")
 run_shell(f"{AUTOHEADER_BIN} --version")
 
+print(f"Environment: {ENV}")
+
 config_folders: list[Path] = []
 
 for root, _, files in os.walk("."):

base-commit: de502b23299f15eeca710034218e35819dec5e38
-- 
2.44.0


  reply	other threads:[~2024-03-12  1:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 19:01 Simon Marchi
2024-03-11 19:01 ` [PATCH 1/8] autoregen.py: re-format with black 24.2.0 Simon Marchi
2024-03-11 19:01 ` [PATCH 2/8] autoregen.py: fix a pyright `reportConstantRedefinition` warning Simon Marchi
     [not found]   ` <871q8f7jx5.fsf@aarsen.me>
2024-03-12 16:00     ` Simon Marchi
2024-03-13  8:58       ` Mark Wielaard
2024-03-18 17:36         ` Arsen Arsenović
2024-03-11 19:01 ` [PATCH 3/8] autoregen.py: add type annotation for config_folders Simon Marchi
2024-03-11 19:01 ` [PATCH 4/8] autoregen.py: capitalize some constant names Simon Marchi
2024-03-11 19:01 ` [PATCH 5/8] autoregen.py: add non-suffixed version of the tools Simon Marchi
2024-03-11 19:01 ` [PATCH 6/8] autoregen.py: print executed commands on stdout Simon Marchi
2024-03-11 19:01 ` [PATCH 7/8] autoregen.py: let subprocesses print to stdout/stderr Simon Marchi
     [not found]   ` <87plvz7k10.fsf@aarsen.me>
2024-03-12 15:40     ` Simon Marchi
2024-03-13  8:46       ` Mark Wielaard
2024-03-11 19:01 ` [PATCH 8/8] autoregen.py: be more verbose Simon Marchi
2024-03-11 21:04 ` [PATCH 0/8] Some changes to autoregen.py Sam James
2024-03-11 21:52   ` Mark Wielaard
2024-03-12  1:53     ` Simon Marchi [this message]
2024-03-12 10:17       ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d0dc333-0359-4e49-9197-01bf636b4351@simark.ca \
    --to=simark@simark.ca \
    --cc=buildbot@sourceware.org \
    --cc=mark@klomp.org \
    --cc=sam@gentoo.org \
    --cc=simon.marchi@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).