From 933df12da8f4e392ee7dc262c2a44720361e3762 Mon Sep 17 00:00:00 2001 From: Nathan Dunne Date: Wed, 20 Jan 2021 13:17:16 +0000 Subject: [PATCH] arm-autonomy/arm-autonomy-host-image-minimal: Use REQUIRED_DISTRO_FEATURES Make use of REQUIRED_DISTRO_FEATURES rather than anonymous python for determining that both arm-autonomy-host and xen are present in DISTRO_FEATURES Issue-Id: SCM-1862 Signed-off-by: Nathan Dunne Change-Id: Id21086ac4f4c45a89fa8fa8a2da28f04919f6b26 Signed-off-by: Jon Mason --- .../images/arm-autonomy-host-image-minimal.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb b/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb index 8245e9aa..7960a35a 100644 --- a/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb +++ b/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb @@ -6,7 +6,7 @@ DESCRIPTION = "Arm Autonomy stack host minimal image" # and install the alternate kernel inherit ${@bb.utils.filter('DISTRO_FEATURES', 'alternate-kernel', d)} -inherit core-image +inherit core-image features_check LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" @@ -80,6 +80,8 @@ DO_IMAGE_MCDEPENDS := "${@ '${MC_DOIMAGE_MCDEPENDS}' if d.getVar('BBMULTICONFIG' # Apply mc dependency. Empty string if multiconfig not enabled do_image[mcdepends] += "${DO_IMAGE_MCDEPENDS}" +REQUIRED_DISTRO_FEATURES += 'arm-autonomy-host' +REQUIRED_DISTRO_FEATURES += 'xen' python __anonymous() { import re @@ -87,12 +89,6 @@ python __anonymous() { guestname_pattern = re.compile(r";guestname=([^;]+);?") guestcount_pattern = re.compile(r";guestcount=(\d+);?") - if bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', False, True, d): - raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'arm-autonomy-host'") - - if bb.utils.contains('DISTRO_FEATURES', 'xen', False, True, d): - raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'xen'") - # Check in ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS for extra guests and add them # to SRC_URI with xenguest parameter if not set guestlist = d.getVar('ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS')