diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-12-13 20:07:12 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-14 12:25:07 +0000 |
commit | 8d315820aa2c860bee05175a42360e549601a16f (patch) | |
tree | a6f9853e108c13d4c8512ae0e7a532d86ef6e776 /bitbake/lib/bb | |
parent | 7229250411e7517cdf9e464d7f6033b155811bd8 (diff) | |
download | poky-8d315820aa2c860bee05175a42360e549601a16f.tar.gz |
bitbake: 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.
(Bitbake rev: 69a3cd790da35c3898a8f50c284ad1a4677682a4)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/command.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 3b68c1aaa2..5bce796b7c 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -187,6 +187,7 @@ class CommandsSync: | |||
187 | """ | 187 | """ |
188 | varname = params[0] | 188 | varname = params[0] |
189 | value = str(params[1]) | 189 | value = str(params[1]) |
190 | command.cooker.extraconfigdata[varname] = value | ||
190 | command.cooker.data.setVar(varname, value) | 191 | command.cooker.data.setVar(varname, value) |
191 | 192 | ||
192 | def getSetVariable(self, command, params): | 193 | def getSetVariable(self, command, params): |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a4aaac59f8..620ff9f3d3 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -358,6 +358,7 @@ class BBCooker: | |||
358 | self.databuilder.parseBaseConfiguration() | 358 | self.databuilder.parseBaseConfiguration() |
359 | self.data = self.databuilder.data | 359 | self.data = self.databuilder.data |
360 | self.data_hash = self.databuilder.data_hash | 360 | self.data_hash = self.databuilder.data_hash |
361 | self.extraconfigdata = {} | ||
361 | 362 | ||
362 | if consolelog: | 363 | if consolelog: |
363 | self.data.setVar("BB_CONSOLELOG", consolelog) | 364 | self.data.setVar("BB_CONSOLELOG", consolelog) |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 389df4f1bc..2ad8aad98e 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1036,6 +1036,7 @@ class RunQueue: | |||
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | worker.stdin.write(b"<cookerconfig>" + pickle.dumps(self.cooker.configuration) + b"</cookerconfig>") | 1038 | worker.stdin.write(b"<cookerconfig>" + pickle.dumps(self.cooker.configuration) + b"</cookerconfig>") |
1039 | worker.stdin.write(b"<extraconfigdata>" + pickle.dumps(self.cooker.extraconfigdata) + b"</extraconfigdata>") | ||
1039 | worker.stdin.write(b"<workerdata>" + pickle.dumps(workerdata) + b"</workerdata>") | 1040 | worker.stdin.write(b"<workerdata>" + pickle.dumps(workerdata) + b"</workerdata>") |
1040 | worker.stdin.flush() | 1041 | worker.stdin.flush() |
1041 | 1042 | ||