Skip to content

Conversation

@doraskayo
Copy link
Contributor

From the commit message:

Failures in "after" scripts do not currently result in bootstrap
failures since "find" ignores the exit code of commands that it
executes.

There are no simple options in "find" to both propagate non-0 exit
statuses of executed commands and also abort its command execution
sequence in such an event. As such, use "find" only for listing
script names and otherwise use a simple loop to execute them.

While at it, execute scripts in numerical order according to their
basename. This gives consumers control over the execution order of
their scripts. For example, 50-sign.sh will be executed before
51-upload.sh.

This is needed to avoid bootstraps registering as successful in CI even though there were failures in "after" scripts. I ran into this issue when updating freedesktop-sdk's bootstrap to be based on a newer version of live-bootstrap (see: freedesktop-sdk-binary-seed!102)

Failures in "after" scripts do not currently result in bootstrap
failures since "find" ignores the exit code of commands that it
executes.

There are no simple options in "find" to both propagate non-0 exit
statuses of executed commands and also abort its command execution
sequence in such an event. As such, use "find" only for listing
script names and otherwise use a simple loop to execute them.

While at it, execute scripts in numerical order according to their
basename. This gives consumers control over the execution order of
their scripts. For example, 50-sign.sh will be executed before
51-upload.sh.
@fosslinux
Copy link
Owner

Good catch, thanks!

I should check through the codebases of any other things like this where we miss execution aborts.

@fosslinux fosslinux merged commit 1899f7f into fosslinux:master Feb 26, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants