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

Attachment: signature.asc
Description: Digital signature

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to