diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-05-10 13:58:27 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-05-10 13:58:27 +0000 |
| commit | af92db59a7d2367528bc86cb37d969e87ef36659 (patch) | |
| tree | 605b5ae55979b6b3c3c89ed83802d01cad5e2870 /recipes-containers/container-registry | |
| parent | 3d431848b32caae67b9dcbf7fe04f08ddcd448b5 (diff) | |
| download | meta-virtualization-af92db59a7d2367528bc86cb37d969e87ef36659.tar.gz | |
vcontainer-common: support nested OCI layout and fix vimport shell errors
The multi-arch OCI functions (is_oci_image_index, get_oci_platforms,
select_platform_manifest) only checked index.json directly for platform
information. With the skopeo-compatible nested OCI layout — where
index.json references a single image index blob that in turn contains
the per-platform manifests — the functions failed to detect multi-arch
images because index.json no longer contains platform entries.
Add _resolve_oci_platform_file() helper that handles both layouts:
- Flat: platform info directly in index.json (legacy/simple case)
- Nested: index.json → image index blob → platform manifests
All three multi-arch functions now use this single helper, eliminating
the layout resolution logic that would otherwise be duplicated in each.
Also fixes two issues in the vimport case block:
- 'local' keyword used outside a function (bash error on line 1879).
The vimport handler is in a case statement in the main script body,
not inside a function, so 'local' is invalid. The original multi-arch
code was written assuming it would be inside a function.
- OCI_SELECTED_PLATFORM was blank in output because select_platform_manifest
sets it inside a $() subshell, where variable assignments are lost.
Use normalize_arch_to_oci directly for the display message instead.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/container-registry')
0 files changed, 0 insertions, 0 deletions
