[oe-commits] [bitbake] 02/03: cooker: Experiment with multiple BuildStarted for multiconfig
git at git.openembedded.org
git at git.openembedded.org
Thu Jul 6 15:49:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 51a758bff15313aa4af83f1733a7667a4ce5ca6b
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Apr 26 21:03:15 2017 +0100
cooker: Experiment with multiple BuildStarted for multiconfig
Currently builds in multiple TMPDIRs with multiconfig can break
since the BuildStarted event is used to create directory strutures in several
cases (e.g. buildstats.bbclass) and there is only on BuildStarted event
generated in a multiconfig build.
We have two options, a) to add a new MultiConfigBuildStarted event which is
generated once per multiconfig, or b) allow multiple BuildStarted events.
Having reviewed the code and current users of BuildStarted, sending one event
per multiconfig seems like its the best way forward and the existing code looks
able to cope with the duplication of events. I did also check toaster and I think
that can handle this issue too (multiconfig builds may have other issues there).
I'm therefore proposing we send multiple BuildStarted events for multiconfig
and for consistency, send multiple BuildCompleted events too.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cooker.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 479dc5a..c140220 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1191,6 +1191,10 @@ class BBCooker:
if siggen_cache:
bb.parse.siggen.checksum_cache.mtime_cache.clear()
+ def copyBuildVars(self, d):
+ for i in ["BUILDNAME", "BUILDSTART", "DATE", "TIME"]:
+ d.setVar(i, self.data.getVar(i, False))
+
def matchFiles(self, bf):
"""
Find the .bb files which match the expression in 'buildfile'.
@@ -1362,7 +1366,10 @@ class BBCooker:
if not retval:
try:
- bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data)
+ for mc in self.multiconfigs:
+ localdata = data.createCopy(self.databuilder.mcdata[mc])
+ self.copyBuildVars(localdata)
+ bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), localdata)
finally:
self.command.finishAsyncCommand(msg)
return False
@@ -1395,7 +1402,10 @@ class BBCooker:
ntargets.append("multiconfig:%s:%s:%s" % (target[0], target[1], target[2]))
ntargets.append("%s:%s" % (target[1], target[2]))
- bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.data)
+ for mc in self.multiconfigs:
+ localdata = data.createCopy(self.databuilder.mcdata[mc])
+ self.copyBuildVars(localdata)
+ bb.event.fire(bb.event.BuildStarted(buildname, ntargets), localdata)
rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
if 'universe' in targets:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list