summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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:21 +0100
commit3cb87724a5b21550e99c18e97b665d6604bb2fa9 (patch)
tree648b17c23b5a20ab23f3d02f3ab7888b0fc6be97 /bitbake/lib
parent764fbeaafe64cea32f9da98848f01d8c1a71fc33 (diff)
downloadpoky-3cb87724a5b21550e99c18e97b665d6604bb2fa9.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: f980f060cd0d1e7fe5011f3c325c1b254f05eccf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-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 2176167eb7..9c101f2e72 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1573,6 +1573,7 @@ class CookerExit(bb.event.Event):
1573class CookerCollectFiles(object): 1573class CookerCollectFiles(object):
1574 def __init__(self, priorities): 1574 def __init__(self, priorities):
1575 self.appendlist = {} 1575 self.appendlist = {}
1576 self.bbappends = []
1576 self.appliedappendlist = [] 1577 self.appliedappendlist = []
1577 self.bbfile_config_priorities = priorities 1578 self.bbfile_config_priorities = priorities
1578 1579
@@ -1667,6 +1668,7 @@ class CookerCollectFiles(object):
1667 # Build a list of .bbappend files for each .bb file 1668 # Build a list of .bbappend files for each .bb file
1668 for f in bbappend: 1669 for f in bbappend:
1669 base = os.path.basename(f).replace('.bbappend', '.bb') 1670 base = os.path.basename(f).replace('.bbappend', '.bb')
1671 self.bbappends.append((base, f))
1670 if not base in self.appendlist: 1672 if not base in self.appendlist:
1671 self.appendlist[base] = [] 1673 self.appendlist[base] = []
1672 if f not in self.appendlist[base]: 1674 if f not in self.appendlist[base]:
@@ -1692,11 +1694,11 @@ class CookerCollectFiles(object):
1692 """ 1694 """
1693 filelist = [] 1695 filelist = []
1694 f = os.path.basename(fn) 1696 f = os.path.basename(fn)
1695 for bbappend in self.appendlist: 1697 for b in self.bbappends:
1698 (bbappend, filename) = b
1696 if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])): 1699 if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
1697 self.appliedappendlist.append(bbappend) 1700 self.appliedappendlist.append(bbappend)
1698 for filename in self.appendlist[bbappend]: 1701 filelist.append(filename)
1699 filelist.append(filename)
1700 return filelist 1702 return filelist
1701 1703
1702 def collection_priorities(self, pkgfns, d): 1704 def collection_priorities(self, pkgfns, d):
@@ -1716,10 +1718,10 @@ class CookerCollectFiles(object):
1716 unmatched.add(regex) 1718 unmatched.add(regex)
1717 1719
1718 def findmatch(regex): 1720 def findmatch(regex):
1719 for bbfile in self.appendlist: 1721 for b in self.bbappends:
1720 for append in self.appendlist[bbfile]: 1722 (bbfile, append) = b
1721 if regex.match(append): 1723 if regex.match(append):
1722 return True 1724 return True
1723 return False 1725 return False
1724 1726
1725 for unmatch in unmatched.copy(): 1727 for unmatch in unmatched.copy():