From ec8b840bf22a1a4914553ed46469ee5915246690 Mon Sep 17 00:00:00 2001 From: Naoto Yamaguchi Date: Sun, 7 May 2023 21:44:03 +0900 Subject: Improve error handling in multi partition integration Existing multi partition integration out the error of out of tree image in wic creation process. That error message is difficult understanding. This patch add out of tree image check at more earlier timing. Bug-AGL: SPEC-4777 Change-Id: If1a0ba8d78b5ff1e7b19ef6a10a8f9fc98312b8a Signed-off-by: Naoto Yamaguchi --- .../images/agl-lxc-multi-partition-image.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc b/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc index 7d6fcf12..9556c1e9 100644 --- a/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc +++ b/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc @@ -39,12 +39,22 @@ install_container_images() { done if ${@bb.utils.contains('OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR', 'non', 'false', 'true', d)}; then + er=0 for image in ${OUT_OF_TREE_CONTAINER_IMAGES}; do rm -f "${DEPLOY_DIR_IMAGE}/${image}.ext4" src="${OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR}/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.ext4" - bbnote "Installing ${src}" + if [ ! -e ${src} ]; then + bberror "File not found at ${src}." + er=1 + else + bbnote "Installing ${src}" + fi ln -s ${src} "${DEPLOY_DIR_IMAGE}/${image}.ext4" done + + if [ $er -eq 1 ]; then + bbfatal "AGL Demo IVI images install error. Please check OUT_OF_TREE_CONTAINER_IMAGE_DEPLOY_DIR setting and IVI side build status." + fi fi } -- cgit 1.2.3-korg