All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] image: Fix IMAGE_FEATURES determinism issue
@ 2016-05-09 13:09 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-05-09 13:09 UTC (permalink / raw)
  To: openembedded-core

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>

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 1fb1964..a1772ad 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 ""




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-09 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09 13:09 [PATCH] image: Fix IMAGE_FEATURES determinism issue Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.