[oe-commits] [openembedded-core] 02/10: image: Fix IMAGE_FEATURES determinism issue

git at git.openembedded.org git at git.openembedded.org
Mon May 9 22:49:35 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 96edb21e99b68a8545ee256179f242b2686a3e4d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon May 9 14:09:37 2016 +0100

    image: Fix IMAGE_FEATURES determinism issue
    
    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 at linuxfoundation.org>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4542e95..6b9f979 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -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 ""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list