summaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-29 16:09:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-29 23:23:49 +0100
commit3f8febc4212fbd3485ac9bdd4ac71b8fb0a05693 (patch)
treea3e716d2c3837fc46bd80e46ce0cdea5e056ebf0 /lib/bb/cooker.py
parent66dff37ebcd1dd14ebd6933d727df9cf0a641866 (diff)
downloadbitbake-contrib-3f8febc4212fbd3485ac9bdd4ac71b8fb0a05693.tar.gz
cooker: Ensure bbappend order is deterministic
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>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 96cefc73f..771932a82 100644
--- a/lib/bb/cooker.py
+++ b/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)