]> code.ossystems Code Review - openembedded-core.git/commitdiff
native/nativesdk: Ensure DISTRO_FEATURES is determistic
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Jun 2017 10:03:55 +0000 (11:03 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Jun 2017 14:04:12 +0000 (15:04 +0100)
set() order is random and hence the filtered native/nativesdk DISTRO_FEATURES
could be set to random ordering. We've been lucky so far this tended not to
cause issues but some queued changes highedlighted this. Thrown in a sorted()
so the order is deterministic and we get consistent hash checksums between runs
and between machines.

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

index b8f839a8b2a09b1d54e60054d1faefac0632a200..6b7f3dd76ead442008c6a1c38c1109394173435d 100644 (file)
@@ -129,7 +129,7 @@ python native_virtclass_handler () {
     # from modifying native distro features
     features = set(d.getVar("DISTRO_FEATURES_NATIVE").split())
     filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVE"), d).split())
-    d.setVar("DISTRO_FEATURES", " ".join(features | filtered))
+    d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
 
     classextend = e.data.getVar('BBCLASSEXTEND') or ""
     if "native" not in classextend:
index 655b4560e7ccf4547beee8717ca04e1b58ad66ef..69fb45c8a58b34127c8974e8ef329489f1295bfb 100644 (file)
@@ -74,7 +74,7 @@ python nativesdk_virtclass_handler () {
     # from modifying nativesdk distro features
     features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
     filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split())
-    d.setVar("DISTRO_FEATURES", " ".join(features | filtered))
+    d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
 
     e.data.setVar("MLPREFIX", "nativesdk-")
     e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN").replace("-nativesdk", "").replace("nativesdk-", ""))