[OE-core] [PATCH 1/2] image.bbclass: Correct chaining compression support
Tom Rini
trini at konsulko.com
Wed Sep 20 00:22:08 UTC 2017
On Tue, Sep 19, 2017 at 11:23:33AM +0200, Martin Hundebøll wrote:
> Hi Tom,
>
> On 2017-07-22 00:06, Tom Rini wrote:
> >diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> >index de535ce6fcff..bd6a5b7b810a 100644
> >--- a/meta/classes/image.bbclass
> >+++ b/meta/classes/image.bbclass
> >@@ -453,7 +453,7 @@ python () {
> > rm_tmp_images = set()
> > def gen_conversion_cmds(bt):
> > for ctype in ctypes:
> >- if bt[bt.find('.') + 1:] == ctype:
> >+ if bt.endswith("." + ctype):
> > type = bt[0:-len(ctype) - 1]
> > if type.startswith("debugfs_"):
> > type = type[8:]
>
> This is the change that in fact messes with our cpio.gz.u-boot image
> types, causing base hash changes.
>
> I suspect the changed if-check to be too permissive. In our case, it
> now matches any ctype that ends with ".u-boot", and not just
> "gz.u-boot" as set in IMAGE_FSTYPES.
>
> Wouldn't it be correct to match on the entire bt variable? I.e.
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>
> index ef2b38aeaf..818932f7f1 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -454,7 +454,7 @@ python () {
> rm_tmp_images = set()
> def gen_conversion_cmds(bt):
> for ctype in ctypes:
> - if bt.endswith("." + ctype):
> + if bt.split('.', 1) == [t, ctype]:
> type = bt[0:-len(ctype) - 1]
> if type.startswith("debugfs_"):
> type = type[8:]
>
> This works for me, preliminary tested with the following fs types
> configured:
>
> IMAGE_FSTYPES = "cpio.gz.u-boot"
> IMAGE_FSTYPES = "tar cpio cpio.gz cpio.gz.u-boot"
> IMAGE_FSTYPES = "tar cpio cpio.gz cpio.gz.u-boot tar.bz2 jffs2 wic
> wic.bmap"
Good catch. Does it also work with say cpio.u-boot.gz ? And does
oe-selftest still pass for the image related parts? I think those are
spelled out in the thread too (I've forgotten the incantation myself
now, sorry).
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170919/a29e51c2/attachment-0002.sig>
More information about the Openembedded-core
mailing list