diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-10 04:33:36 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-10 21:04:20 +0000 |
| commit | 56f78049cff106e52a57e2544d025ea94fd0c702 (patch) | |
| tree | ee55b586ef09006d69e093d3b9fabec855f23542 | |
| parent | e115569bee2d11f3912dcca0127573029d0d715c (diff) | |
| download | meta-virtualization-56f78049cff106e52a57e2544d025ea94fd0c702.tar.gz | |
image-oci-umoci: create usrmerge symlinks in multi-layer mode
ROOTFS_PREPROCESS_COMMAND creates usrmerge symlinks (/bin -> usr/bin,
etc.) during do_rootfs, but multi-layer OCI mode installs packages
to separate layer rootfs directories that bypass this step. Call the
existing create_merged_usr_symlinks function on the first packages
layer to fix this.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | classes/image-oci-umoci.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc index eeb41ca5..bad6c5d0 100644 --- a/classes/image-oci-umoci.inc +++ b/classes/image-oci-umoci.inc | |||
| @@ -584,6 +584,16 @@ IMAGE_CMD:oci() { | |||
| 584 | bbnote "OCI: Copying pre-installed packages from $oci_preinstall_rootfs" | 584 | bbnote "OCI: Copying pre-installed packages from $oci_preinstall_rootfs" |
| 585 | # Use rsync to merge into bundle rootfs (handles symlinks properly) | 585 | # Use rsync to merge into bundle rootfs (handles symlinks properly) |
| 586 | rsync -a --no-owner --no-group "$oci_preinstall_rootfs/" "$image_bundle_name/rootfs/" | 586 | rsync -a --no-owner --no-group "$oci_preinstall_rootfs/" "$image_bundle_name/rootfs/" |
| 587 | |||
| 588 | # Create usrmerge symlinks in the first packages layer. | ||
| 589 | # Normally done by ROOTFS_PREPROCESS_COMMAND in do_rootfs, | ||
| 590 | # which doesn't run for multi-layer rootfs directories. | ||
| 591 | if [ "$oci_pkg_layer_num" = "1" ]; then | ||
| 592 | if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then | ||
| 593 | bbnote "OCI: Creating usrmerge symlinks in first layer" | ||
| 594 | create_merged_usr_symlinks "$image_bundle_name/rootfs" | ||
| 595 | fi | ||
| 596 | fi | ||
| 587 | else | 597 | else |
| 588 | bbwarn "OCI: Pre-installed rootfs not found at $oci_preinstall_rootfs" | 598 | bbwarn "OCI: Pre-installed rootfs not found at $oci_preinstall_rootfs" |
| 589 | fi | 599 | fi |
