summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2021-07-27 15:51:51 -0400
committerScott Murray <scott.murray@konsulko.com>2021-08-04 17:14:38 +0000
commitd2ac80ea4ddfd3ce4567cc2f2ebb181927c42d9b (patch)
tree7ab077262dd89330a635eb7977085f45bcea9d1f
parentfd011336c08a11f8d4f818dcac351908ae403b76 (diff)
lxc-host-image-minimal: Handle Kingfisher image names
To handle the Kingfisher supporting ULCB builds modifying the IMAGE_LINK_NAME variable, add a MACHINE_SUFFIX variable that is defined based on a new "kingfisher" feature being present in AGL_FEATURES. Since so far only one platform has this issue, this simple approach seems better than attempting to derive the suffix from IMAGE_LINK_NAME using anonymous Python. Bug-AGL: SPEC-4023 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ida769fbeb57208934f738dc5d1c867ab63c40bff (cherry picked from commit aac67cb520cd945f960189d12ea9bbe1815891de)
-rw-r--r--meta-agl-lxc/recipes-platform/images/lxc-host-image-minimal.bb5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta-agl-lxc/recipes-platform/images/lxc-host-image-minimal.bb b/meta-agl-lxc/recipes-platform/images/lxc-host-image-minimal.bb
index f702da18..11eb513b 100644
--- a/meta-agl-lxc/recipes-platform/images/lxc-host-image-minimal.bb
+++ b/meta-agl-lxc/recipes-platform/images/lxc-host-image-minimal.bb
@@ -15,6 +15,9 @@ IMAGE_LINGUAS = " "
NO_RECOMMENDATIONS = "1"
+# Handle modification of IMAGE_LINK_NAME done by ULCB builds with Kingfisher support
+MACHINE_SUFFIX = "${@bb.utils.contains('AGL_FEATURES', 'kingfisher', '-kf', '', d)}"
+
python __anonymous() {
for c in (d.getVar('CONTAINER_IMAGES') or "").split():
(mc, image) = c.split(':')
@@ -35,7 +38,7 @@ install_container_images() {
name=${image#guest-image-}
rm -rf ${IMAGE_ROOTFS}/var/lib/machines/${name}
install -m 0755 -d ${IMAGE_ROOTFS}/var/lib/machines/${name}
- src="${TOPDIR}/tmp-${config}/deploy/images/${MACHINE}/${image}-${MACHINE}.tar.bz2"
+ src="${TOPDIR}/tmp-${config}/deploy/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.tar.bz2"
bbnote "Installing ${src}"
tar -C ${IMAGE_ROOTFS}/var/lib/machines/${name} -xf ${src}
done