All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cooker: Ensure bbappend order is deterministic
@ 2016-03-29 15:09 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-03-29 15:09 UTC (permalink / raw)
  To: bitbake-devel

Currently bbappend files in a layer are applied in the order they're
found on disk (as reported by glob) which means things are not
deterministic.

By sorting the glob results, the order becomes deterministic, the parsing
order for .bb files also should be deterministic as a result of this change.

[YOCTO #9138]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3014697..6601dff 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1768,7 +1768,8 @@ class CookerCollectFiles(object):
                 globbed = glob.glob(f)
                 if not globbed and os.path.exists(f):
                     globbed = [f]
-                for g in globbed:
+                # glob gives files in order on disk. Sort to be deterministic.
+                for g in sorted(globbed):
                     if g not in newfiles:
                         newfiles.append(g)
 




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

only message in thread, other threads:[~2016-03-29 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-29 15:09 [PATCH] cooker: Ensure bbappend order is deterministic 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.