image_types_sparse: Fix syntax error
PATCH v2 1/1 image_types_sparse: Fix syntax error
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(-)
meta-oe/classes/image_types_sparse.bbclass +7 -5
@@ -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"
Signature · 1 line
2.39.2