]> code.ossystems Code Review - openembedded-core.git/commitdiff
image.bbclass: Sorted ctypes to avoid basehash error
authorGerson Fernando Budke <nandojve@gmail.com>
Tue, 19 Sep 2017 17:15:36 +0000 (14:15 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Sep 2017 08:24:00 +0000 (09:24 +0100)
When selected multiple subimages a similar error could happend:
  Variable do_image_cpio[subimages] value changed \
    from 'cpio.gz.u-boot cpio.gz' to 'cpio.gz cpio.gz.u-boot'
To avoid this, 'ctypes' should be sorted at 'gen_conversion_cmds'.

This garantee that 'CONVERSION_CMD_xxx' are always written in tha same
order and consequently 'do_image_cpio' have the same hash.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/image.bbclass

index 4850eed77176ffdd722be8d520c686ca455c439c..0d14250c0dcb3210f3fcd21229670102cdce5ea6 100644 (file)
@@ -455,7 +455,7 @@ python () {
 
         rm_tmp_images = set()
         def gen_conversion_cmds(bt):
-            for ctype in ctypes:
+            for ctype in sorted(ctypes):
                 if bt.endswith("." + ctype):
                     type = bt[0:-len(ctype) - 1]
                     if type.startswith("debugfs_"):