Let a unit carry a removelist and name the variables its conf script reads #5
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/fab!5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/unit-slots"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The second half of the Keel decision 0010 prerequisite: the unit loop read
overlay/andconfand nothing else, so two thirds of what a component is could be expressed as a unit and the last third could not.A removelist. A common component goes through three phases: its overlay, its conf script, its removelist. A unit had no slot for the third, so a component with a non-empty removelist could not leave the shared tree (
common/removelists/mysqlis 0 bytes, which is why the experiment did not notice). The loop now has that phase, after the unit conf scripts and before the common removelists, which is where the common removelists sit relative to the common conf scripts. Only a regular file counts, as for the product-localREMOVELIST.CONF_VARS.
_CONF_VARSis settled before any unit is looked at, so a unit had no way to ask for a build-time variable:mk/turnkey/mysql.mkline 1 isCONF_VARS += MYSQL_PASS, and the unit form of that line did not exist. A unit may now carryconf-vars, one variable name per line with#starting a comment; those names joinCONF_VARS. Values still come from the environment or the product Makefile, exactly as a makefile fragment naming a variable leaves them. The names are read fromUNIT_DIRSand not fromUNITS, so the chroot environment of a layered build does not change with the set of units that build applies. An entry that is not a variable name stops make and names the file it came from, instead of reachingexportas junk.UNIT_DIRSmoves above theCONF_VARSblock, since_CONF_VARSnow needs it.Test plan
tests/units.sh, 56 checks (was 38): the removelist applied and its position, aremovelistthat is a directory, a unit without one, a unit left out ofUNITS, a failing removelist; forconf-varsa set variable reachingFAB_CHROOT_ENV, an unset one left out, two units contributing, the set not moving withUNITS, no file at all, and the error path with the offending file named.tests/coverage.sh 100: 75 of 75 checks, 100 percent, gate 100.tests/source-date-epoch.shunchanged and passing.