From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 5212C3858D34 for ; Mon, 15 Apr 2024 02:09:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5212C3858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5212C3858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713146977; cv=none; b=UnlgO0xHJC0nMcae7FqpLsAFNfjNSRO57wSZvmHdLirxZ3IjfXX3Rww3j7lDhpwjuFFsMFM1vK6madY1WwZM65coOT4fUizfHQtkJ7Yjw0OsJCcvxsxA+OqyXlSvbws9p6tEmQxEJNCtSoFLZKm8NYcvR2wleRNsfdkZDua/Kk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713146977; c=relaxed/simple; bh=ADLT5p8tDDRB63qgYlsGdhvJYo2BuM5lTp15BEG0ysw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=j6pENQBC+cPjiglEGyKyoDgocBU3TTfFN91nJmcr30kqKWJxRKzOJ7mtXw7CkztorjgzbuwBzmlX6K08F7vzPYZaispwgeoxLJeIagQsEAO1NqT0fLy5TwnFJgsgyu7OQxXEmf+LaLfGUIV1cs2lCjZzbz3RKVhnC4EujeAy+Qk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1713146957; bh=ADLT5p8tDDRB63qgYlsGdhvJYo2BuM5lTp15BEG0ysw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Cg3rb5z618HjSsIOa/lYhLtB/9gxmp9WSz16apmecVVL7CRPpU5SBjdL7QpbCIiIM gYp/AOYPa8EV2Ll7WI9ZLTs91svjv5uG9mVqlpWU1Jdy8ExxZIFinscznHuzrj2KZa BKvtjkhWIYNSLa36OV65vqYSuD94mXepiPRPHHus= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 8966B1E030; Sun, 14 Apr 2024 22:09:17 -0400 (EDT) Message-ID: <1aedfffb-f027-474c-af36-d9053cb9a078@simark.ca> Date: Sun, 14 Apr 2024 22:09:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/6] autoregen.py: Flush all print commands To: Christophe Lyon , buildbot@sourceware.org References: <20240412200559.1649050-1-christophe.lyon@linaro.org> <20240412200559.1649050-4-christophe.lyon@linaro.org> Content-Language: en-US From: Simon Marchi In-Reply-To: <20240412200559.1649050-4-christophe.lyon@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2024-04-12 16:05, Christophe Lyon wrote: > For consistency and easier debug of traces > --- > builder/containers/autoregen.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/builder/containers/autoregen.py b/builder/containers/autoregen.py > index 6e341e2..c52a524 100755 > --- a/builder/containers/autoregen.py > +++ b/builder/containers/autoregen.py > @@ -56,7 +56,7 @@ AUTORECONF_DIRS = [ > # > # Print the command on stdout prior to running it. > def run_shell(cmd: str): > - print(f"+ {cmd}") > + print(f"+ {cmd}", flush=True) > res = subprocess.run( > f"{cmd}", > shell=True, > @@ -105,7 +105,7 @@ run_shell(f"{AUTOMAKE_BIN} --version") > run_shell(f"{ACLOCAL_BIN} --version") > run_shell(f"{AUTOHEADER_BIN} --version") > > -print(f"Extra environment: {EXTRA_ENV}") > +print(f"Extra environment: {EXTRA_ENV}", flush=True) > > config_folders: list[Path] = [] > repo_root = Path.cwd() Can you clarify when/where/why that's needed? I would expect the stdout stream to be flushed when there is an end-of-line (which print() does). Simon