* [PATCH] image_types: use COMPRESSIONTYPES variable for backward compatibility
@ 2016-08-19 14:35 Ed Bartosh
2016-08-19 14:45 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Ed Bartosh @ 2016-08-19 14:35 UTC (permalink / raw)
To: openembedded-core
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 <ed.bartosh@linux.intel.com>
---
meta/classes/image_types.bbclass | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 4d92866..2e852af 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -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}"
--
2.6.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] image_types: use COMPRESSIONTYPES variable for backward compatibility
2016-08-19 14:35 [PATCH] image_types: use COMPRESSIONTYPES variable for backward compatibility Ed Bartosh
@ 2016-08-19 14:45 ` Richard Purdie
2016-08-19 18:37 ` Ylinen, Mikko
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2016-08-19 14:45 UTC (permalink / raw)
To: Ed Bartosh, openembedded-core
On Fri, 2016-08-19 at 17:35 +0300, Ed Bartosh wrote:
> 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 <ed.bartosh@linux.intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] image_types: use COMPRESSIONTYPES variable for backward compatibility
2016-08-19 14:45 ` Richard Purdie
@ 2016-08-19 18:37 ` Ylinen, Mikko
0 siblings, 0 replies; 3+ messages in thread
From: Ylinen, Mikko @ 2016-08-19 18:37 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
Hi,
On Fri, Aug 19, 2016 at 5:45 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2016-08-19 at 17:35 +0300, Ed Bartosh wrote:
> > 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 <ed.bartosh@linux.intel.com>
> > ---
> > 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?).
>
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
[-- Attachment #2: Type: text/html, Size: 1800 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-19 18:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-19 14:35 [PATCH] image_types: use COMPRESSIONTYPES variable for backward compatibility Ed Bartosh
2016-08-19 14:45 ` Richard Purdie
2016-08-19 18:37 ` Ylinen, Mikko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.