summaryrefslogtreecommitdiff
path: root/yocto-poky/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/bitbake/lib/bb/cooker.py')
-rw-r--r--yocto-poky/bitbake/lib/bb/cooker.py32
1 files changed, 31 insertions, 1 deletions
diff --git a/yocto-poky/bitbake/lib/bb/cooker.py b/yocto-poky/bitbake/lib/bb/cooker.py
index a0d7d59ea..4df88818f 100644
--- a/yocto-poky/bitbake/lib/bb/cooker.py
+++ b/yocto-poky/bitbake/lib/bb/cooker.py
@@ -255,6 +255,11 @@ class BBCooker:
self.state = state.initial
self.caches_array = []
+ # Need to preserve BB_CONSOLELOG over resets
+ consolelog = None
+ if hasattr(self, "data"):
+ consolelog = self.data.getVar("BB_CONSOLELOG", True)
+
if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
self.enableDataTracking()
@@ -281,6 +286,8 @@ class BBCooker:
self.data = self.databuilder.data
self.data_hash = self.databuilder.data_hash
+ if consolelog:
+ self.data.setVar("BB_CONSOLELOG", consolelog)
# we log all events to a file if so directed
if self.configuration.writeeventlog:
@@ -531,6 +538,11 @@ class BBCooker:
for o in options:
if o in ['prefile', 'postfile']:
clean = False
+ server_val = getattr(self.configuration, "%s_server" % o)
+ if not options[o] and server_val:
+ # restore value provided on server start
+ setattr(self.configuration, o, server_val)
+ continue
setattr(self.configuration, o, options[o])
for k in bb.utils.approved_variables():
if k in environment and k not in self.configuration.env:
@@ -1391,10 +1403,28 @@ class BBCooker:
build.reset_cache()
self.buildSetVars()
+ # If we are told to do the None task then query the default task
+ if (task == None):
+ task = self.configuration.cmd
+
+ if not task.startswith("do_"):
+ task = "do_%s" % task
+
taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort)
buildname = self.data.getVar("BUILDNAME", False)
- bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
+
+ # make targets to always look as <target>:do_<task>
+ ntargets = []
+ for target in fulltargetlist:
+ if ":" in target:
+ if ":do_" not in target:
+ target = "%s:do_%s" % tuple(target.split(":", 1))
+ else:
+ target = "%s:%s" % (target, task)
+ ntargets.append(target)
+
+ bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.data)
rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist)
if 'universe' in targets: