diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-11-01 15:58:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-04 09:36:22 +0000 |
commit | 85b9194171a69fd7f161943f88df9c9f625cb4c7 (patch) | |
tree | bb4c12f2b7b218ab7ea56146c4fed452468e130d /bitbake/lib/bb/build.py | |
parent | a670859103dab0b28e52a4d91f476d2bccbc85ac (diff) | |
download | poky-85b9194171a69fd7f161943f88df9c9f625cb4c7.tar.gz |
bitbake: build, toaster: record proper task type
Bitbake tasks may be of type 'python' or 'shell',
or they may not be executed at all, which is record
as task type 'noexec'.
In order to record proper task type, this patch:
* creates no exec task type as the default value in
the toaster model definition
* adds full task flags to the bb.build.TaskStarted event
in build.py
* if the task actually starts, the toaster ui will
record the type of the task as either 'python' or 'shell'
based on the task flags.
[YOCTO #5073]
[YOCTO #5075]
[YOCTO #5327]
(Bitbake rev: 6648c57e6d369fc009ea3a9fe939def5d2c67bf5)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
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/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 2e49a09365..f9aca42b37 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -91,6 +91,9 @@ class TaskBase(event.Event): | |||
91 | 91 | ||
92 | class TaskStarted(TaskBase): | 92 | class TaskStarted(TaskBase): |
93 | """Task execution started""" | 93 | """Task execution started""" |
94 | def __init__(self, t, logfile, taskflags, d): | ||
95 | super(TaskStarted, self).__init__(t, logfile, d) | ||
96 | self.taskflags = taskflags | ||
94 | 97 | ||
95 | class TaskSucceeded(TaskBase): | 98 | class TaskSucceeded(TaskBase): |
96 | """Task execution completed""" | 99 | """Task execution completed""" |
@@ -422,7 +425,9 @@ def _exec_task(fn, task, d, quieterr): | |||
422 | localdata.setVar('BB_LOGFILE', logfn) | 425 | localdata.setVar('BB_LOGFILE', logfn) |
423 | localdata.setVar('BB_RUNTASK', task) | 426 | localdata.setVar('BB_RUNTASK', task) |
424 | 427 | ||
425 | event.fire(TaskStarted(task, logfn, localdata), localdata) | 428 | flags = localdata.getVarFlags(task) |
429 | |||
430 | event.fire(TaskStarted(task, logfn, flags, localdata), localdata) | ||
426 | try: | 431 | try: |
427 | for func in (prefuncs or '').split(): | 432 | for func in (prefuncs or '').split(): |
428 | exec_func(func, localdata) | 433 | exec_func(func, localdata) |