From c0e8ce2623f49d05b5673a03f821e4f4f3478d7f Mon Sep 17 00:00:00 2001 From: Chris Dimich Date: Fri, 8 Sep 2023 18:28:50 +0200 Subject: [PATCH] image_types_sparse: Fix syntax error When using the image type: IMAGE_FSTYPES += " wic.sparse" IMAGE_CLASSES += " image_types_sparse" The following error arises: Syntax error: Bad function name So need to remove function in favor of variable. Signed-off-by: Chris Dimich Signed-off-by: Khem Raj Signed-off-by: Bastian Krause Signed-off-by: Armin Kuster --- meta-oe/classes/image_types_sparse.bbclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass index 69e24cbb79..68c5dbaa14 100644 --- a/meta-oe/classes/image_types_sparse.bbclass +++ b/meta-oe/classes/image_types_sparse.bbclass @@ -8,9 +8,11 @@ inherit image_types SPARSE_BLOCK_SIZE ??= "4096" CONVERSIONTYPES += "sparse" -CONVERSION_CMD:sparse() { - INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" - truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT" - img2simg -s "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE} -} + +CONVERSION_CMD:sparse = " \ + INPUT="${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"; \ + truncate --no-create --size=%${SPARSE_BLOCK_SIZE} "$INPUT"; \ + img2simg -s "$INPUT" "$INPUT.sparse" ${SPARSE_BLOCK_SIZE}; \ + " + CONVERSION_DEPENDS_sparse = "android-tools-native"