summaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 20:07:12 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 09:54:48 +0000
commit69a3cd790da35c3898a8f50c284ad1a4677682a4 (patch)
treeaa078f5e656cfc3a3e4986492307920ca9183e02 /lib/bb
parentbbbb2a53d5decf3b613a92c4ff77c84bfc5d4903 (diff)
downloadbitbake-contrib-69a3cd790da35c3898a8f50c284ad1a4677682a4.tar.gz
runqueue: enable setVariable command to affect task execution
Allow the client to set variables with the setVariable command and have those changes take effect when running tasks. This is accomplished by collecting changes made by setVariable separately and pass these to the worker so it can be applied on top of the datastore it creates. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/command.py1
-rw-r--r--lib/bb/cooker.py1
-rw-r--r--lib/bb/runqueue.py1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 3b68c1aaa..5bce796b7 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -187,6 +187,7 @@ class CommandsSync:
"""
varname = params[0]
value = str(params[1])
+ command.cooker.extraconfigdata[varname] = value
command.cooker.data.setVar(varname, value)
def getSetVariable(self, command, params):
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index a4aaac59f..620ff9f3d 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -358,6 +358,7 @@ class BBCooker:
self.databuilder.parseBaseConfiguration()
self.data = self.databuilder.data
self.data_hash = self.databuilder.data_hash
+ self.extraconfigdata = {}
if consolelog:
self.data.setVar("BB_CONSOLELOG", consolelog)
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 389df4f1b..2ad8aad98 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1036,6 +1036,7 @@ class RunQueue:
}
worker.stdin.write(b"<cookerconfig>" + pickle.dumps(self.cooker.configuration) + b"</cookerconfig>")
+ worker.stdin.write(b"<extraconfigdata>" + pickle.dumps(self.cooker.extraconfigdata) + b"</extraconfigdata>")
worker.stdin.write(b"<workerdata>" + pickle.dumps(workerdata) + b"</workerdata>")
worker.stdin.flush()