Skip to content

build: fail loudly when the OpenWrt make fails instead of exiting silently#47

Open
ispyisail wants to merge 1 commit into
openwrt-2512from
build-scripts-loud-fail
Open

build: fail loudly when the OpenWrt make fails instead of exiting silently#47
ispyisail wants to merge 1 commit into
openwrt-2512from
build-scripts-loud-fail

Conversation

@ispyisail

Copy link
Copy Markdown
Owner

Stacked on #43 — base branch is openwrt-2512 (the 25.12 bump), not master. Merge #43 first; this rebases cleanly onto master afterward.

Neither build.sh nor rebuild.sh checked the main OpenWrt make's exit status. On a failed make, both fell through to their "did we produce any images" check, whose bare exit on failure printed nothing — a genuine build failure was indistinguishable from the script just stopping, with no indication of what broke or where. This directly cost real debugging time during the 25.12 bump work: a package failure was masked across several full-build attempts before it was found by bypassing both scripts and running make V=s directly.

Checks the make exit status immediately after each invocation and bails with the exit code and a pointer at the next diagnostic step (make V=s in the target's -src directory); gives the previously-silent "no image files after build" exit paths a real error message too, for the same reason.

…ently

Neither build.sh nor rebuild.sh checked the main OpenWrt make's exit
status. On a failed make they fell through to the image_files check,
whose bare "exit" printed nothing -- a failed build was
indistinguishable from the script simply stopping, and the only way to
find the real error was re-running make directly. This masked a real
package failure across multiple full builds before anyone caught it.

Check the make exit status right after each invocation and bail with
the status and a pointer at the failing step; give the previously
silent "no image files after build" exits a real error message too.
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.

1 participant