[oe-commits] [bitbake] 02/02: cooker: Ensure bbappend order is deterministic

git at git.openembedded.org git at git.openembedded.org
Tue Mar 29 22:43:53 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 3f8febc4212fbd3485ac9bdd4ac71b8fb0a05693
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Mar 29 16:09:52 2016 +0100

    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 at linuxfoundation.org>
---
 lib/bb/cooker.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 96cefc7..771932a 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)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list