diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-09 19:58:56 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-09 20:03:27 +0000 |
| commit | d79d3d2a449054b700f66fe04532f11c1c72c65a (patch) | |
| tree | ea3d2eee1ef3d80978e9dbbe70d95a26f0157852 /recipes-containers/vcontainer/vcontainer-tarball.bb | |
| parent | ed5b33932e5f9ad8dc530a53fddfc865fc60d60c (diff) | |
| download | meta-virtualization-d79d3d2a449054b700f66fe04532f11c1c72c65a.tar.gz | |
vcontainer: fix yocto-check-layer mcdepends parse error
Fix yocto-check-layer failure:
ERROR: Multiconfig dependency mc::vruntime-x86-64:vpdmn-initramfs-create:do_deploy
depends on nonexistent multiconfig configuration named configuration vruntime-x86-64
Several recipes and classes declared static mcdepends referencing
vruntime-aarch64 and vruntime-x86-64 multiconfigs. When parsed without
BBMULTICONFIG set (e.g. yocto-check-layer), BitBake validates these and
fails because the referenced multiconfigs don't exist.
Move mcdepends into anonymous python functions and only set them when
the target multiconfig exists in BBMULTICONFIG, following the pattern
established in meta/classes-recipe/kernel-fit-image.bbclass.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/vcontainer/vcontainer-tarball.bb')
| -rw-r--r-- | recipes-containers/vcontainer/vcontainer-tarball.bb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/recipes-containers/vcontainer/vcontainer-tarball.bb b/recipes-containers/vcontainer/vcontainer-tarball.bb index 8d7cecf9..8bbaa85c 100644 --- a/recipes-containers/vcontainer/vcontainer-tarball.bb +++ b/recipes-containers/vcontainer/vcontainer-tarball.bb | |||
| @@ -124,17 +124,20 @@ def get_available_architectures(d): | |||
| 124 | # VCONTAINER_ARCHITECTURES = "aarch64" | 124 | # VCONTAINER_ARCHITECTURES = "aarch64" |
| 125 | VCONTAINER_ARCHITECTURES ?= "x86_64 aarch64" | 125 | VCONTAINER_ARCHITECTURES ?= "x86_64 aarch64" |
| 126 | 126 | ||
| 127 | # Trigger multiconfig blob builds automatically via mcdepends | ||
| 128 | # Build BOTH architectures so a single bitbake command produces a complete SDK | ||
| 129 | do_populate_sdk[mcdepends] = "\ | ||
| 130 | mc::vruntime-x86-64:vdkr-initramfs-create:do_deploy \ | ||
| 131 | mc::vruntime-x86-64:vpdmn-initramfs-create:do_deploy \ | ||
| 132 | mc::vruntime-aarch64:vdkr-initramfs-create:do_deploy \ | ||
| 133 | mc::vruntime-aarch64:vpdmn-initramfs-create:do_deploy \ | ||
| 134 | " | ||
| 135 | |||
| 136 | # Print banner at parse time (before builds start) | 127 | # Print banner at parse time (before builds start) |
| 128 | # Also conditionally set mcdepends based on available multiconfigs | ||
| 137 | python () { | 129 | python () { |
| 130 | # Conditionally set mcdepends based on available multiconfigs | ||
| 131 | # (avoids parse errors when BBMULTICONFIG is not set, e.g. yocto-check-layer) | ||
| 132 | bbmulticonfig = (d.getVar('BBMULTICONFIG') or "").split() | ||
| 133 | mcdeps = [] | ||
| 134 | for mc in ['vruntime-x86-64', 'vruntime-aarch64']: | ||
| 135 | if mc in bbmulticonfig: | ||
| 136 | mcdeps.append('mc::%s:vdkr-initramfs-create:do_deploy' % mc) | ||
| 137 | mcdeps.append('mc::%s:vpdmn-initramfs-create:do_deploy' % mc) | ||
| 138 | if mcdeps: | ||
| 139 | d.setVarFlag('do_populate_sdk', 'mcdepends', ' '.join(mcdeps)) | ||
| 140 | |||
| 138 | # Only print for main multiconfig (not vruntime-* multiconfigs) | 141 | # Only print for main multiconfig (not vruntime-* multiconfigs) |
| 139 | mc = d.getVar('BB_CURRENT_MC') or '' | 142 | mc = d.getVar('BB_CURRENT_MC') or '' |
| 140 | if mc == '' and d.getVar('BB_WORKERCONTEXT') != '1': | 143 | if mc == '' and d.getVar('BB_WORKERCONTEXT') != '1': |
