Skip to content

Shorten the build's runner messages and comments; report every missing firmware pattern - #210

Merged
DevomB merged 3 commits into
mainfrom
cleanup-build-code
Oct 7, 2026
Merged

DevomB merged 3 commits into
mainfrom
cleanup-build-code

Conversation

@DevomB

@DevomB DevomB commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

The code changes in build/ that the comment-only cleanup (#206) could not make. Stacked on #206: this branch holds #206's commit plus one of its own, so merge #206 first and this diff shrinks to the second commit.

  • build/lib/common.sh, runner functions only (stage_depends_on, _stamp_stale) and require_inside_chroot: the refusals lose their history ("it predates this harness", "the step() that recorded FAILED builds as successful", "under the current harness") and their essay. Every phrase tools/tests/step-errexit.sh matches is kept ("Refusing to resume onto changed inputs", "proves nothing", "stamp records a different fingerprint", "rebuilding this step", "has not completed").
  • build/recipes/console.sh: the kryptik-console wrapper it writes gets one-line comments (inside the heredoc, so this is code for the stamp).
  • build/config/firmware.list: its header becomes a two-line format table and the Intel and graphics notes one line each. Patterns are unchanged; firmware.sh strips everything from #.
  • build/recipes/firmware.sh: a bug fix that rides with the firmware.list edit, since both re-fingerprint the same steps. n="$(... | grep -c .)" exits 1 when a pattern matches nothing, and under the step's set -Eeuo pipefail that aborted the recipe at the first such pattern, before its MISSING line and the summary naming them all; it is now grep -c . || true.
  • build/stages/01-toolchain.sh: a grep whose \ continuation had been collapsed into one line padded with spaces is split again. declare -f output is byte-identical, so the toolchain identity does not move.
  • build/stages/05-kernel.sh: the nested-tree check names its header in one line instead of "See the header of / this file."

Build cost. The runner functions are excluded from every recipe's fingerprint, and stage 01's edit leaves declare -f unchanged. The console heredoc re-fingerprints the console step and the late configuration steps after it. firmware.list is an argument of the linux-firmware step, so that step and every stage 04 step after it rebuild (meson, the Wayland stack, wlroots, dwl, the desktop and configuration steps), then stage 06. Stage 05 chains on elfutils, which comes before both, so the kernel does not rebuild; stage 05's verify-install check reruns alone. firmware.list is the expensive part: drop that file if a comment is not worth the desktop-stack rebuild, or merge this together with a pin bump that rebuilds stage 04 anyway (#173 restarts it).

Not done, and why: boot-check.sh's duplicate seatd check and 04-base-system.sh's step_failure_hint history (open PRs change those files); cryptsetup.sh's no-op benchmark --help line and man-db.sh's message (each rebuilds a long tail of steps, the latter the kernel too: worth doing only with a version bump of that package).

The first Distro run (36989902525) tests the head before the firmware.sh fix; a second one is dispatched on the new head once it finishes.

DevomB added 2 commits October 2, 2026 02:21
The stamp machinery in common.sh, the stages, every recipe, the service
scripts and s6 run files, the guest checks, the config lists and the
patch-set READMEs lose their stacked comments, history and rhetoric. Each
recipe drops its two-line "a stage 04 recipe, sourced by..." header.
Wrong comments are corrected: bc's shim name, shadow's man pages, the
boot-success re-arm file, testctl's key list, and the glibc README's claim
that the whole patch directory is fingerprinted.

Comments only. bash's declare -f output of every changed script is
unchanged and no heredoc body moves, so no recipe or stage function
re-fingerprints. Files hashed whole still move their step: the service
scripts, run files and sysctl file the late services step, the guest
checks the tests step, the allowlists stage 06's rootfs step, and the
kernel checker's accepted list its check step alone.
The stamp runner's refusals lose their history ("predates this harness")
and their essay, keeping every phrase step-errexit.sh matches; the
unchrooted escape hatch and stage 05's nested-tree check say what they
mean in a line. The console wrapper the console recipe writes gets one-
line comments, and firmware.list's header a tight format table. Stage
01's collapsed grep continuation is split again.

Fingerprints: the runner functions are excluded from every recipe's, and
stage 01's change leaves declare -f identical. The console recipe's
heredoc and firmware.list are step inputs, so the console step, the
linux-firmware step and every stage 04 step after them rebuild, with
stage 06; stage 05 builds on elfutils, earlier, so the kernel does not.
grep -c exits 1 when it counts nothing, and under the step's pipefail that aborted the recipe at the first such pattern, before its MISSING line and the summary that names them all.
@DevomB DevomB changed the title Shorten the build's runner messages and the console wrapper's comments Shorten the build's runner messages and comments; report every missing firmware pattern Oct 2, 2026
@DevomB
DevomB merged commit d68f281 into main Oct 7, 2026
11 checks passed
@DevomB
DevomB deleted the cleanup-build-code branch October 7, 2026 08:17
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