]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: Ensure bbappend order is deterministic
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Mar 2016 15:09:52 +0000 (16:09 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Mar 2016 22:23:49 +0000 (23:23 +0100)
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>
lib/bb/cooker.py

index 96cefc73fd5a49523a8865eea324449c7f9e26ec..771932a82d386a158ac41950cc5cb1de2d0206a9 100644 (file)
@@ -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)