image_types: use COMPRESSIONTYPES variable for backward compatibility
PATCH 1/1 image_types: use COMPRESSIONTYPES variable for backward compatibility
Recent renaming of COMPRESSIONTYPES variable can break recipes that still use it. Including value of COMPRESSIONTYPES variable into CONVERSIONTYPES should prevent this.
--- meta/classes/image_types.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/image_types.bbclass +7 -1
@@ -316,7 +316,13 @@ IMAGE_TYPES = " \ wic wic.gz wic.bz2 wic.lzma \ " -CONVERSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap" +# Compression is a special case of conversion. The old variable +# names are still supported for backward-compatibility. When defining +# new compression or conversion commands, use CONVERSIONTYPES and +# CONVERSION_CMD/DEPENDS. +COMPRESSIONTYPES ?= "" + +CONVERSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap ${COMPRESSIONTYPES}" CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" CONVERSION_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz" CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
Signature · 1 line
2.6.6
Quoted 8 lines · Ed Bartosh
Recent renaming of COMPRESSIONTYPES variable can break recipes that still use it. Including value of COMPRESSIONTYPES variable into CONVERSIONTYPES should prevent this.
Signed-off-by Ed Bartosh <[email protected]>--- meta/classes/image_types.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Does this actually work? Won't COMPRESSION_CMD be unset in these cases so it would just trigger further failures?
Perhaps we should just error and tell the user if COMPRESSION_TYPES is set (in sanity.bbclass?).
Cheers,
Richard
Hi,
Quoted 10 lines · Richard Purdie
Quoted 8 lines · Ed Bartosh
Recent renaming of COMPRESSIONTYPES variable can break recipes that still use it. Including value of COMPRESSIONTYPES variable into CONVERSIONTYPES should prevent this.
Signed-off-by Ed Bartosh <[email protected]>--- meta/classes/image_types.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 6 lines
Does this actually work? Won't
COMPRESSION_CMDbe unset in these cases so it would just trigger further failures?Perhaps we should just error and tell the user if
COMPRESSION_TYPESis set (in sanity.bbclass?).
These lines were simply missing
from 9d68c024790850cab72ead1e3372a5fcec4ef7b0
(the commit message talks about these lines).
In Ostro we add a few custom conversions via COMPRESSIONTYPES_append and without
this patch those types are not recognized and we hit:
"No IMAGE_CMD defined for IMAGE_FSTYPES entry 'dsk.ova' - possibly invalid type name or missing support class"
(ova is one of our COMPRESSIONTYPES).
-- Mikko