diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-03 11:19:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 22:37:43 +0100 |
commit | 5cd1fd86f49ef98f4fb24b0e4806583bd201cb99 (patch) | |
tree | 493cb0dab5566b313da4dd3540de0c209b3bec55 /bitbake | |
parent | 5d11fecd3f7b89040a5d3ea1b7c25eef6536e8c2 (diff) | |
download | poky-5cd1fd86f49ef98f4fb24b0e4806583bd201cb99.tar.gz |
bitbake: bitbake-worker: Set BB_CURRENTTASK earlier
For some debugging, BB_CURRENTTASK is set too late to be useful as
it isn't present in some event handlers for example. There is no
other way to know which task is actually running so set the value
earlier.
(Bitbake rev: 7daaaaa27f55b5a458656857c6d61a51b34a62fe)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-worker | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/build.py | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 6a12e1fed2..c8eb65567f 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -237,6 +237,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha | |||
237 | the_data = databuilder.mcdata[mc] | 237 | the_data = databuilder.mcdata[mc] |
238 | the_data.setVar("BB_WORKERCONTEXT", "1") | 238 | the_data.setVar("BB_WORKERCONTEXT", "1") |
239 | the_data.setVar("BB_TASKDEPDATA", taskdepdata) | 239 | the_data.setVar("BB_TASKDEPDATA", taskdepdata) |
240 | the_data.setVar('BB_CURRENTTASK', taskname.replace("do_", "")) | ||
240 | if cfg.limited_deps: | 241 | if cfg.limited_deps: |
241 | the_data.setVar("BB_LIMITEDDEPS", "1") | 242 | the_data.setVar("BB_LIMITEDDEPS", "1") |
242 | the_data.setVar("BUILDNAME", workerdata["buildname"]) | 243 | the_data.setVar("BUILDNAME", workerdata["buildname"]) |
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 7e4ab9f64c..d6418e40b3 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -569,7 +569,6 @@ exit $ret | |||
569 | def _task_data(fn, task, d): | 569 | def _task_data(fn, task, d): |
570 | localdata = bb.data.createCopy(d) | 570 | localdata = bb.data.createCopy(d) |
571 | localdata.setVar('BB_FILENAME', fn) | 571 | localdata.setVar('BB_FILENAME', fn) |
572 | localdata.setVar('BB_CURRENTTASK', task[3:]) | ||
573 | localdata.setVar('OVERRIDES', 'task-%s:%s' % | 572 | localdata.setVar('OVERRIDES', 'task-%s:%s' % |
574 | (task[3:].replace('_', '-'), d.getVar('OVERRIDES', False))) | 573 | (task[3:].replace('_', '-'), d.getVar('OVERRIDES', False))) |
575 | localdata.finalize() | 574 | localdata.finalize() |
diff --git a/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf b/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf index efebf001a9..2645c0e985 100644 --- a/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf +++ b/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf | |||
@@ -12,6 +12,6 @@ STAMP = "${TMPDIR}/stamps/${PN}" | |||
12 | T = "${TMPDIR}/workdir/${PN}/temp" | 12 | T = "${TMPDIR}/workdir/${PN}/temp" |
13 | BB_NUMBER_THREADS = "4" | 13 | BB_NUMBER_THREADS = "4" |
14 | 14 | ||
15 | BB_HASHBASE_WHITELIST = "BB_CURRENT_MC BB_HASHSERVE TMPDIR TOPDIR SLOWTASKS SSTATEVALID FILE" | 15 | BB_HASHBASE_WHITELIST = "BB_CURRENT_MC BB_HASHSERVE TMPDIR TOPDIR SLOWTASKS SSTATEVALID FILE BB_CURRENTTASK" |
16 | 16 | ||
17 | include conf/multiconfig/${BB_CURRENT_MC}.conf | 17 | include conf/multiconfig/${BB_CURRENT_MC}.conf |