4.2. Final Checks

Before building packages, verify that the environment is loaded, the target partition is mounted where expected, and the directory and compatibility-link layout actually matches policy.

Gate before package builds: do not proceed until variables, mount state, directories, and links are all confirmed. A five-minute check here is cheaper than debugging path drift and/or breaking your system in chapter 5.

Section 3.2 defined the build variables, section 3.3 defined the target directory and link layout, and section 4.1 staged source archives. This section is the last consistency check before package build steps begin.

What Should Be True Right Now

At this point, all of the following should already be true:

If any item in that list is uncertain, treat it as a blocker and resolve it before continuing.

Variable Verification Checklist

Confirm that the build shell currently exposes the expected values for at least these variables:

Also confirm that optional tuning variables are either deliberately set or intentionally empty (LWI_MAKE_FLAGS, LWI_CFLAGS, LWI_CXXFLAGS, LBI_CUSTOM_LDFLAGS).

The practical rule is simple: if a variable value surprises you now, it will surprise you more during a failed configure or install phase.

Mount Verification Checklist

Confirm that the filesystem mounted at LBI_ROOT is the target partition and not the host root. If this is wrong, any “successful” directory or install action is writing into the wrong tree.

Also confirm that any chosen boot/ESP mount paths are present and match your intended boot layout policy from chapter 3.

Directory and Link Verification Checklist

Confirm that the primary directories from section 3.1/3.3 exist inside the mounted target tree, including at least:

Then confirm that compatibility links exist and resolve to the intended targets, including:

If these links are missing or point somewhere unexpected, correct them before package installation begins.

Readiness Outcome

When variables, mount state, directories, and compatibility links are all verified, chapter 5 can proceed on a stable base.

If one of these checks fails, pause and fix the layout first. Continuing anyway only converts a clear setup issue into a noisier and less enjoyable build failure later.