From: Chris Dimich <[email protected]>

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 <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Signed-off-by: Bastian Krause <[email protected]>
---
This is a backport of dff205f5a ("image_types_sparse: Fix syntax
error"), excluding the removal of IMAGE_NAME_SUFFIX because in
mickledore, ${IMAGE_NAME_SUFFIX} is and will not be included in
${IMAGE_NAME}.

Changes since (implicit) v1:
- add missing semicolons
---
 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 69e24cbb7..68c5dbaa1 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"
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#104808): 
https://lists.openembedded.org/g/openembedded-devel/message/104808
Mute This Topic: https://lists.openembedded.org/mt/101240708/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to