]> code.ossystems Code Review - openembedded-core.git/commitdiff
image: Fix IMAGE_FEATURES determinism issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 May 2016 13:09:37 +0000 (14:09 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 May 2016 09:08:30 +0000 (10:08 +0100)
remain_features uses a dict which means the order is not deterministic. This
can lead to the task hash changing depending on the state of the memory at
parse time. This is particularly noticeable under python v3.

Since the dict is helpful in constructing the data, pass the data through
sort() so the order is always deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass

index 4542e95d1e51e7854eee7466ce38feceba8e1fc2..6b9f9798db672d919f9930a5ce864fa44d9c2659 100644 (file)
@@ -166,7 +166,7 @@ python () {
         if temp:
             bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp))))
 
-    d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
+    d.setVar('IMAGE_FEATURES', ' '.join(sorted(list(remain_features))))
 
     check_image_features(d)
     initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""