Skip to content

Conversation

@danielmerja
Copy link

No description provided.

danielmerja and others added 3 commits January 5, 2025 20:16
Consolidated common logic for loading suite, flavor, and board into a single load_config function.
Reduced repetitive cd commands and improved error handling.
Streamlined partial-build checks (kernel-only, rootfs-only, etc.) for early exits.
Ensured original functionality remains intact while enhancing code clarity.
On some systems like Ubuntu 24.04, the build.sh script could exit
prematurely if output redirection to `tee` was used and the script
needed to terminate early due to missing parameters for a full build.

This occurred because `set -e` would cause the script to exit if `tee`
terminated with a non-zero status, which can happen if it receives a
SIGPIPE when the script calls `exit`. This could preempt the intended
error messaging (e.g., the usage instructions).

The fix involves making the `tee` command within the process substitution
more resilient by appending `|| true`:
`exec > >(tee "build/logs/build-$(date +"%Y%m%d%H%M%S").log" || true) 2>&1`

This ensures that if `tee` exits due to a SIGPIPE (or another error)
when the script is intentionally exiting, its exit status does not
itself trigger an immediate script termination via `set -e`, allowing
the script's own exit procedures (like printing usage) to complete.
@github-actions
Copy link

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 14 days. Thank you for your contribution!

@github-actions github-actions bot added the stale Issues with a lack of recent activity label Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues with a lack of recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant