diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-12 17:13:07 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-12 17:13:07 +0000 |
| commit | 5470cd0a37044ef316bec00cc5c476b39876179c (patch) | |
| tree | 1e379d0a14d5614f750adf0deaf20dbe0864ab05 /recipes-containers/go-errors/go-errors_git.bb | |
| parent | 6fc1aa83552713dc03933115890badebb297e4ae (diff) | |
| download | meta-virtualization-5470cd0a37044ef316bec00cc5c476b39876179c.tar.gz | |
image-oci: auto-derive IMAGE_INSTALL from OCI_LAYERS packages layers
A multi-layer image recipe (OCI_LAYER_MODE = "multi") needs every
package it puts into a packages: layer to also be reachable by
do_rootfs's recrdeptask so the package is actually built before
layer assembly tries to pull it from DEPLOY_DIR_*PK. The convention
to date has been: list each package twice — once in OCI_LAYERS, once
in IMAGE_INSTALL — and keep both in sync by hand.
Any drift between the two sources of truth silently breaks the build
at layer-assembly time. The error surfaces as "missing package in
DEPLOY_DIR" rather than as a parse-time complaint about the recipe,
so it's also annoying to debug.
The parse-time anonymous python in this class already walks
OCI_LAYERS, validates each entry, and collects every package name
into a set. It then stops at bb.debug logging that set. Append the
set to IMAGE_INSTALL instead. do_rootfs picks the entries up via the
existing recrdeptask, the recipe gets one source of truth, and drift
is no longer possible.
The append is additive — a recipe is still free to add IMAGE_INSTALL
entries that aren't named in any final layer (e.g. packages used only
during a rootfs postprocess fixup). The auto-derivation only fires
when OCI_LAYER_MODE = "multi" and at least one packages: layer is
present, so single-layer recipes and pure directories/files/host
multi-layer recipes are unaffected.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/go-errors/go-errors_git.bb')
0 files changed, 0 insertions, 0 deletions
