Apply the units before the common removelists, and let a build select them #4
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!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/unit-order"
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?
share/product.mkalready resolves and applies fab units, and the Keel decision 0010 experiment showed a layer built from a unit is the same layer. Two things about the loop stood in the way of using one as a component.Position. The loop ran after the common removelists and after the product-local overlay. A common removelist could not remove a file a unit brought in, and a recipe's own overlay stopped winning over the component's. The loop now runs after the common overlays, conf scripts and patches and before the common removelists, with all unit overlays applied before any unit conf script, mirroring the two phases the common inputs go through.
Selection. Every directory under
unit.dwas applied, with no way to leave one out. A layered build must not re-run the conf script of a component its parent already applied:conf/mysqldoesln -s /etc/init.d/mysqlunderbash -eand fails the second time. The newUNITSvariable names the units to apply and defaults to all of them. Plans are still resolved fromUNIT_DIRSwhateverUNITSsays, since a plan only names packages.Each command in the loops gets
|| exit: a phase is one shell line, so a unit failing in the middle of it was swallowed.Test plan
tests/units.sh: 38 checks. It builds a fake product with three units against thisproduct.mkwithfab-apply-overlay,fab-chroot,fab-apply-removelist,fab-apply-patchandfab-plan-resolvereplaced by stubs that log their arguments, then asserts on the log. Covers each unit input, each position,UNITSdefault, one unit, empty, nounit.d, and both failure paths.tests/coverage.shruns both suites: 57 of 57 checks, 100 percent, gate 100.tests/source-date-epoch.shunchanged and passing.UNITS.