summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-17 12:27:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-26 09:27:32 +0100
commit335c975650580001b2176020c762c002bde198d6 (patch)
treea9e2907b72bbbac2ad897b7839f8114e60935038 /bitbake/lib/bb/ui/toasterui.py
parentd7c8d9558c8b600be1507212c78dde833b2bb57e (diff)
downloadpoky-335c975650580001b2176020c762c002bde198d6.tar.gz
poky-335c975650580001b2176020c762c002bde198d6.tar.bz2
poky-335c975650580001b2176020c762c002bde198d6.zip
bitbake: toaster: fixes after replacing BuildRequest with Build
This is a set of fixes that repair the interface after we switched from displaying BuildRequest data to Build data in the formerly "managed" mode. (Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 30540483c3..9c59fd07c6 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -43,7 +43,7 @@ import xmlrpclib
featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING, bb.cooker.CookerFeatures.SEND_SANITYEVENTS]
-logger = logging.getLogger("BitBake")
+logger = logging.getLogger("ToasterLogger")
interactive = sys.stdout.isatty()
@@ -66,7 +66,6 @@ def _log_settings_from_server(server):
def main(server, eventHandler, params ):
-
helper = uihelper.BBUIHelper()
console = logging.StreamHandler(sys.stdout)
@@ -235,12 +234,18 @@ def main(server, eventHandler, params ):
if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)):
continue
- if isinstance(event, (bb.event.BuildCompleted)):
+ if isinstance(event, (bb.event.BuildCompleted, bb.command.CommandFailed)):
+
+ if (isinstance(event, bb.command.CommandFailed)):
+ errors += 1
+ errorcode = 1
+ logger.error("Command execution failed: %s", event.error)
+
# update the build info helper on BuildCompleted, not on CommandXXX
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
buildinfohelper.close(errorcode)
# mark the log output; controllers may kill the toasterUI after seeing this log
- logger.info("ToasterUI build done")
+ logger.info("ToasterUI build done 1, brbe: %s" % buildinfohelper.brbe )
# we start a new build info
if buildinfohelper.brbe is not None:
@@ -254,22 +259,13 @@ def main(server, eventHandler, params ):
taskfailures = []
buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+ logger.info("ToasterUI build done 2")
continue
if isinstance(event, (bb.command.CommandCompleted,
bb.command.CommandFailed,
bb.command.CommandExit)):
errorcode = 0
- if (isinstance(event, bb.command.CommandFailed)):
- event.levelno = format.ERROR
- event.msg = "Command Failed " + event.error
- event.pathname = ""
- event.lineno = 0
- buildinfohelper.store_log_event(event)
- errors += 1
- errorcode = 1
- logger.error("Command execution failed: %s", event.error)
-
continue