Improve error handling in multi partition integration 32/28832/2
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Sun, 7 May 2023 12:44:03 +0000 (21:44 +0900)
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Mon, 8 May 2023 23:13:10 +0000 (08:13 +0900)
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 <naoto.yamaguchi@aisin.co.jp>
meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc

index 7d6fcf1..9556c1e 100644 (file)
@@ -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
 }