diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-12 03:12:36 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-12 13:35:03 +0000 |
| commit | 6fc1aa83552713dc03933115890badebb297e4ae (patch) | |
| tree | 67b3518cce15c5591f57f1b3ad3358fb13d86bd4 /recipes-containers/go-errors/go-errors_git.bb | |
| parent | 5bd3f928dad9f423a74793cad6a6bda212a12bde (diff) | |
| download | meta-virtualization-6fc1aa83552713dc03933115890badebb297e4ae.tar.gz | |
vcontainer-tarball: track rootfs hash via explicit mcdepends
vcontainer-tarball bundles vdkr and vpdmn rootfs images alongside
the helper scripts into a single-shot SDK tarball. Those rootfs
images live in the vruntime-x86-64 / vruntime-aarch64 multiconfigs
and are pulled into the tarball at do_populate_sdk time from
tmp-<mc>/deploy/images/<machine>/<tool>/<arch>/rootfs.img. For
sstate to behave correctly, the tarball task's hash must reflect
the actual rootfs content.
In practice it didn't. A rootfs content change — adding netavark
to the image, switching the runtime from iptables to nftables —
left consumers of the SDK with a stale runtime even though their
config asked for the new behaviour. Cleansstate of vcontainer-tarball
alone didn't help: the path through the cached intermediates was
serving the old image back.
The recipe was relying on the chain
rootfs-image:do_build
-> initramfs-create:do_compile
-> initramfs-create:do_deploy
-> mcdepends -> tarball:do_populate_sdk
to propagate the rootfs hash. The break is at do_deploy: it reads
its rootfs.img out of DEPLOY_DIR, which is a known sstate sharp edge.
do_deploy can sstate-hit on its own hash while the file it deploys
came from a stale prior run, after which the downstream tarball task
hash is computed against the stale content and also hits cache.
Add a direct mcdepends from do_populate_sdk to
{vdkr,vpdmn}-rootfs-image:do_image_complete for each enabled vruntime
multiconfig. The rootfs-image task's hash now feeds the tarball hash
directly, independent of the intermediate do_deploy step. If a rootfs
content change moves the rootfs-image hash, the tarball is forced to
rebuild. When the chain was already healthy this dep adds nothing
new and costs nothing.
Verified end-to-end:
bitbake vcontainer-tarball -c cleansstate
bitbake vcontainer-tarball
sha256sum tmp/deploy/sdk/vcontainer-standalone.sh
# -> f8e75f947a506202d88a6eb196a3616f5088b11247207beab589e91fb6f2bba7
echo 'IMAGE_INSTALL:append:pn-vpdmn-rootfs-image = " bash"' \
>> conf/local.conf
bitbake vcontainer-tarball
sha256sum tmp/deploy/sdk/vcontainer-standalone.sh
# -> 1e89554500b2a4aaabc149a01f85fad2e78ba35796977469e7fcb1ecf15a856f
Hashes differ — the rootfs content change correctly invalidated the
tarball's sstate hash and produced a fresh build.
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
