diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-30 13:29:33 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-31 22:39:30 +0100 |
commit | 00b2c3a5e47c6b37058a85238c570cf7d126f733 (patch) | |
tree | 5e87e84cd898caa1e30a5c9fb7c3037bf2ce7ac9 /bitbake/lib/bb | |
parent | 23a0e97d2e2530314cf6d364fab2d5e295cb7856 (diff) | |
download | 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/lib/bb')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 16 |
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): | |||
1573 | class CookerCollectFiles(object): | 1573 | class 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(): |