summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-30 13:29:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-31 22:39:30 +0100
commit00b2c3a5e47c6b37058a85238c570cf7d126f733 (patch)
tree5e87e84cd898caa1e30a5c9fb7c3037bf2ce7ac9 /bitbake
parent23a0e97d2e2530314cf6d364fab2d5e295cb7856 (diff)
downloadast2050-yocto-poky-00b2c3a5e47c6b37058a85238c570cf7d126f733.zip
ast2050-yocto-poky-00b2c3a5e47c6b37058a85238c570cf7d126f733.tar.gz
bitbake: cooker: Ensure bbappend files are processed in a determistic order
self.appendlist is a dict and as such unordered. This can lead to cases where appends with different names (e.g. x_%.bbappend vs. x_123.bbappend) can be reordered in application which in turn reorders the variables that those bbappend files might touch. Reorderd variables changes the sstate cache signatures causing real world issues. To avoid this, use a list for the append files instead. This patch is conservative and just adds a new data structure alongside the existing one and uses it to resolve the core issue. Later patches (post release) can handle some of the wider but less problematic ones (e.g. issues in bitbake-layers flatten). [YOCTO #7511] (Bitbake rev: ba14fb2df8793aae5d671a408c2ba2145a1a7284) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2176167..9c101f2 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1573,6 +1573,7 @@ class CookerExit(bb.event.Event):
class CookerCollectFiles(object):
def __init__(self, priorities):
self.appendlist = {}
+ self.bbappends = []
self.appliedappendlist = []
self.bbfile_config_priorities = priorities
@@ -1667,6 +1668,7 @@ class CookerCollectFiles(object):
# Build a list of .bbappend files for each .bb file
for f in bbappend:
base = os.path.basename(f).replace('.bbappend', '.bb')
+ self.bbappends.append((base, f))
if not base in self.appendlist:
self.appendlist[base] = []
if f not in self.appendlist[base]:
@@ -1692,11 +1694,11 @@ class CookerCollectFiles(object):
"""
filelist = []
f = os.path.basename(fn)
- for bbappend in self.appendlist:
+ for b in self.bbappends:
+ (bbappend, filename) = b
if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
self.appliedappendlist.append(bbappend)
- for filename in self.appendlist[bbappend]:
- filelist.append(filename)
+ filelist.append(filename)
return filelist
def collection_priorities(self, pkgfns, d):
@@ -1716,10 +1718,10 @@ class CookerCollectFiles(object):
unmatched.add(regex)
def findmatch(regex):
- for bbfile in self.appendlist:
- for append in self.appendlist[bbfile]:
- if regex.match(append):
- return True
+ for b in self.bbappends:
+ (bbfile, append) = b
+ if regex.match(append):
+ return True
return False
for unmatch in unmatched.copy():
OpenPOWER on IntegriCloud