* [DistroKit] [PATCH 1/3] ci-prepare: use the correct ptxdist script inside Jenkins environment
@ 2025-10-22 12:29 Roland Hieber
2025-10-22 12:29 ` [DistroKit] [PATCH 2/3] ci-prepare: make return value safe Roland Hieber
2025-10-22 12:29 ` [DistroKit] [PATCH 3/3] ci-prepare: fix indentation Roland Hieber
0 siblings, 2 replies; 6+ messages in thread
From: Roland Hieber @ 2025-10-22 12:29 UTC (permalink / raw)
To: distrokit; +Cc: Roland Hieber
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
ci-prepare | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ci-prepare b/ci-prepare
index 4144d28eca2f..0bb4e58664c2 100755
--- a/ci-prepare
+++ b/ci-prepare
@@ -1,11 +1,13 @@
#!/bin/sh
+# Note: this script is sourced by Jenkins, which has the auto-detected PTXdist
+# version symlinked to ./p
case "${JOB_BASE_NAME}" in
*v8a*)
[ -e selected_toolchain_r5 ] || {
# store away the currently selected toolchain
[ -e selected_toolchain ] && mv selected_toolchain selected_toolchain_ci_backup
# create toolchain based on v7a platform, which is needed for R5 processor.
- ptxdist toolchain --platformconfig=configs/platform-v7a/platformconfig
+ ./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
--
2.47.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [DistroKit] [PATCH 2/3] ci-prepare: make return value safe
2025-10-22 12:29 [DistroKit] [PATCH 1/3] ci-prepare: use the correct ptxdist script inside Jenkins environment Roland Hieber
@ 2025-10-22 12:29 ` Roland Hieber
2025-10-22 12:46 ` Roland Hieber
2025-10-22 12:29 ` [DistroKit] [PATCH 3/3] ci-prepare: fix indentation Roland Hieber
1 sibling, 1 reply; 6+ messages in thread
From: Roland Hieber @ 2025-10-22 12:29 UTC (permalink / raw)
To: distrokit; +Cc: Roland Hieber
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 <rhi@pengutronix.de>
---
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
# 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DistroKit] [PATCH 2/3] ci-prepare: make return value safe
2025-10-22 12:29 ` [DistroKit] [PATCH 2/3] ci-prepare: make return value safe Roland Hieber
@ 2025-10-22 12:46 ` Roland Hieber
0 siblings, 0 replies; 6+ messages in thread
From: Roland Hieber @ 2025-10-22 12:46 UTC (permalink / raw)
To: distrokit
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 <rhi@pengutronix.de>
> ---
> 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 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* [DistroKit] [PATCH 3/3] ci-prepare: fix indentation
2025-10-22 12:29 [DistroKit] [PATCH 1/3] ci-prepare: use the correct ptxdist script inside Jenkins environment Roland Hieber
2025-10-22 12:29 ` [DistroKit] [PATCH 2/3] ci-prepare: make return value safe Roland Hieber
@ 2025-10-22 12:29 ` Roland Hieber
2025-10-22 12:43 ` Alexander Dahl
1 sibling, 1 reply; 6+ messages in thread
From: Roland Hieber @ 2025-10-22 12:29 UTC (permalink / raw)
To: distrokit; +Cc: Roland Hieber
Use tabs for indentation as anywhere else in the codebase. No functional
change indented.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
ci-prepare | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/ci-prepare b/ci-prepare
index 14337f14e46e..4bbeb668aa4b 100755
--- a/ci-prepare
+++ b/ci-prepare
@@ -2,19 +2,19 @@
# Note: this script is sourced by Jenkins, which has the auto-detected PTXdist
# version symlinked to ./p
case "${JOB_BASE_NAME}" in
- *v8a*)
- if [ -e selected_toolchain_r5 ]; then
- # store away the currently selected toolchain
- 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
- if [ -e selected_toolchain_ci_backup ]; then
- mv selected_toolchain_ci_backup selected_toolchain
- fi
- fi
- ;;
+ *v8a*)
+ if [ -e selected_toolchain_r5 ]; then
+ # store away the currently selected toolchain
+ 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
+ if [ -e selected_toolchain_ci_backup ]; then
+ mv selected_toolchain_ci_backup selected_toolchain
+ fi
+ fi
+ ;;
esac
--
2.47.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DistroKit] [PATCH 3/3] ci-prepare: fix indentation
2025-10-22 12:29 ` [DistroKit] [PATCH 3/3] ci-prepare: fix indentation Roland Hieber
@ 2025-10-22 12:43 ` Alexander Dahl
2025-10-22 13:06 ` Roland Hieber
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Dahl @ 2025-10-22 12:43 UTC (permalink / raw)
To: Roland Hieber; +Cc: distrokit
Hello Roland,
Am Wed, Oct 22, 2025 at 02:29:12PM +0200 schrieb Roland Hieber:
> Use tabs for indentation as anywhere else in the codebase. No functional
> change indented.
Pun indented? I mean intended? ;-)
FWIW, this patch actually has white space change only, so:
Reviewed-by: Alexander Dahl <ada@thorsis.com>
Greets
Alex
>
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
> ci-prepare | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/ci-prepare b/ci-prepare
> index 14337f14e46e..4bbeb668aa4b 100755
> --- a/ci-prepare
> +++ b/ci-prepare
> @@ -2,19 +2,19 @@
> # Note: this script is sourced by Jenkins, which has the auto-detected PTXdist
> # version symlinked to ./p
> case "${JOB_BASE_NAME}" in
> - *v8a*)
> - if [ -e selected_toolchain_r5 ]; then
> - # store away the currently selected toolchain
> - 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
> - if [ -e selected_toolchain_ci_backup ]; then
> - mv selected_toolchain_ci_backup selected_toolchain
> - fi
> - fi
> - ;;
> + *v8a*)
> + if [ -e selected_toolchain_r5 ]; then
> + # store away the currently selected toolchain
> + 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
> + if [ -e selected_toolchain_ci_backup ]; then
> + mv selected_toolchain_ci_backup selected_toolchain
> + fi
> + fi
> + ;;
> esac
> --
> 2.47.3
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DistroKit] [PATCH 3/3] ci-prepare: fix indentation
2025-10-22 12:43 ` Alexander Dahl
@ 2025-10-22 13:06 ` Roland Hieber
0 siblings, 0 replies; 6+ messages in thread
From: Roland Hieber @ 2025-10-22 13:06 UTC (permalink / raw)
To: distrokit
On Wed, Oct 22, 2025 at 02:43:33PM +0200, Alexander Dahl wrote:
> Hello Roland,
>
> Am Wed, Oct 22, 2025 at 02:29:12PM +0200 schrieb Roland Hieber:
> > Use tabs for indentation as anywhere else in the codebase. No functional
> > change indented.
>
> Pun indented? I mean intended? ;-)
Pun was not indented. Fixed in v2.
> FWIW, this patch actually has white space change only, so:
>
> Reviewed-by: Alexander Dahl <ada@thorsis.com>
Thanks, somehow these trivial patches always get fast reviews 😁
- Roland
--
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 |
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-10-22 13:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-22 12:29 [DistroKit] [PATCH 1/3] ci-prepare: use the correct ptxdist script inside Jenkins environment Roland Hieber
2025-10-22 12:29 ` [DistroKit] [PATCH 2/3] ci-prepare: make return value safe Roland Hieber
2025-10-22 12:46 ` Roland Hieber
2025-10-22 12:29 ` [DistroKit] [PATCH 3/3] ci-prepare: fix indentation Roland Hieber
2025-10-22 12:43 ` Alexander Dahl
2025-10-22 13:06 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox