From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 22 Oct 2025 14:46:55 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vBYEw-00AbtK-37 for lore@lore.pengutronix.de; Wed, 22 Oct 2025 14:46:54 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vBYEw-0004MI-C4; Wed, 22 Oct 2025 14:46:54 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vBYEv-0004M9-Mo for distrokit@pengutronix.de; Wed, 22 Oct 2025 14:46:53 +0200 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vBYEv-004tT7-1h for distrokit@pengutronix.de; Wed, 22 Oct 2025 14:46:53 +0200 Received: from rhi by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1vBYEv-00BBAG-1Q for distrokit@pengutronix.de; Wed, 22 Oct 2025 14:46:53 +0200 Date: Wed, 22 Oct 2025 14:46:53 +0200 From: Roland Hieber To: distrokit@pengutronix.de Message-ID: <1761137178-54a32b9b17ee0ec2b09fc806@pty> References: <20251022122947.241881-1-rhi@pengutronix.de> <20251022122947.241881-2-rhi@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251022122947.241881-2-rhi@pengutronix.de> Subject: Re: [DistroKit] [PATCH 2/3] ci-prepare: make return value safe X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Wed, Oct 22, 2025 at 02:29:11PM +0200, Roland Hieber wrote: > If ./selected_toolchain_r5 does not exist, [ -e selected_toolchain_r5 ] > will return falsely and the script will return falsely too, failing the > build. Ignore the return values by wrapping the test calls into ifs > instead of relying on short-circuit. > > Signed-off-by: Roland Hieber > --- > ci-prepare | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/ci-prepare b/ci-prepare > index 0bb4e58664c2..14337f14e46e 100755 > --- a/ci-prepare > +++ b/ci-prepare > @@ -3,14 +3,18 @@ > # version symlinked to ./p > case "${JOB_BASE_NAME}" in > *v8a*) > - [ -e selected_toolchain_r5 ] || { > + if [ -e selected_toolchain_r5 ]; then Wait no, this is missing a negation in the if. Currently this makes the build fail. - Roland > # store away the currently selected toolchain > - [ -e selected_toolchain ] && mv selected_toolchain selected_toolchain_ci_backup > + if [ -e selected_toolchain ]; then > + mv selected_toolchain selected_toolchain_ci_backup > + fi > # create toolchain based on v7a platform, which is needed for R5 processor. > ./p toolchain --platformconfig=configs/platform-v7a/platformconfig > mv selected_toolchain selected_toolchain_r5 > # restore the selected toolchain, if there was one before > - [ -e selected_toolchain_ci_backup ] && mv selected_toolchain_ci_backup selected_toolchain > - } > + if [ -e selected_toolchain_ci_backup ]; then > + mv selected_toolchain_ci_backup selected_toolchain > + fi > + fi > ;; > esac > -- > 2.47.3 > > > -- Roland Hieber, Pengutronix e.K. | rhi@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |