diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-17 12:27:48 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:27:32 +0100 |
| commit | 335c975650580001b2176020c762c002bde198d6 (patch) | |
| tree | a9e2907b72bbbac2ad897b7839f8114e60935038 /bitbake/lib/bb/ui/toasterui.py | |
| parent | d7c8d9558c8b600be1507212c78dde833b2bb57e (diff) | |
| download | poky-335c975650580001b2176020c762c002bde198d6.tar.gz | |
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.py | 24 |
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 | |||
| 43 | 43 | ||
| 44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING, bb.cooker.CookerFeatures.SEND_SANITYEVENTS] | 44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING, bb.cooker.CookerFeatures.SEND_SANITYEVENTS] |
| 45 | 45 | ||
| 46 | logger = logging.getLogger("BitBake") | 46 | logger = logging.getLogger("ToasterLogger") |
| 47 | interactive = sys.stdout.isatty() | 47 | interactive = sys.stdout.isatty() |
| 48 | 48 | ||
| 49 | 49 | ||
| @@ -66,7 +66,6 @@ def _log_settings_from_server(server): | |||
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | def main(server, eventHandler, params ): | 68 | def main(server, eventHandler, params ): |
| 69 | |||
| 70 | helper = uihelper.BBUIHelper() | 69 | helper = uihelper.BBUIHelper() |
| 71 | 70 | ||
| 72 | console = logging.StreamHandler(sys.stdout) | 71 | console = logging.StreamHandler(sys.stdout) |
| @@ -235,12 +234,18 @@ def main(server, eventHandler, params ): | |||
| 235 | if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)): | 234 | if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)): |
| 236 | continue | 235 | continue |
| 237 | 236 | ||
| 238 | if isinstance(event, (bb.event.BuildCompleted)): | 237 | if isinstance(event, (bb.event.BuildCompleted, bb.command.CommandFailed)): |
| 238 | |||
| 239 | if (isinstance(event, bb.command.CommandFailed)): | ||
| 240 | errors += 1 | ||
| 241 | errorcode = 1 | ||
| 242 | logger.error("Command execution failed: %s", event.error) | ||
| 243 | |||
| 239 | # update the build info helper on BuildCompleted, not on CommandXXX | 244 | # update the build info helper on BuildCompleted, not on CommandXXX |
| 240 | buildinfohelper.update_build_information(event, errors, warnings, taskfailures) | 245 | buildinfohelper.update_build_information(event, errors, warnings, taskfailures) |
| 241 | buildinfohelper.close(errorcode) | 246 | buildinfohelper.close(errorcode) |
| 242 | # mark the log output; controllers may kill the toasterUI after seeing this log | 247 | # mark the log output; controllers may kill the toasterUI after seeing this log |
| 243 | logger.info("ToasterUI build done") | 248 | logger.info("ToasterUI build done 1, brbe: %s" % buildinfohelper.brbe ) |
| 244 | 249 | ||
| 245 | # we start a new build info | 250 | # we start a new build info |
| 246 | if buildinfohelper.brbe is not None: | 251 | if buildinfohelper.brbe is not None: |
| @@ -254,22 +259,13 @@ def main(server, eventHandler, params ): | |||
| 254 | taskfailures = [] | 259 | taskfailures = [] |
| 255 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) | 260 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) |
| 256 | 261 | ||
| 262 | logger.info("ToasterUI build done 2") | ||
| 257 | continue | 263 | continue |
| 258 | 264 | ||
| 259 | if isinstance(event, (bb.command.CommandCompleted, | 265 | if isinstance(event, (bb.command.CommandCompleted, |
| 260 | bb.command.CommandFailed, | 266 | bb.command.CommandFailed, |
| 261 | bb.command.CommandExit)): | 267 | bb.command.CommandExit)): |
| 262 | errorcode = 0 | 268 | errorcode = 0 |
| 263 | if (isinstance(event, bb.command.CommandFailed)): | ||
| 264 | event.levelno = format.ERROR | ||
| 265 | event.msg = "Command Failed " + event.error | ||
| 266 | event.pathname = "" | ||
| 267 | event.lineno = 0 | ||
| 268 | buildinfohelper.store_log_event(event) | ||
| 269 | errors += 1 | ||
| 270 | errorcode = 1 | ||
| 271 | logger.error("Command execution failed: %s", event.error) | ||
| 272 | |||
| 273 | 269 | ||
| 274 | continue | 270 | continue |
| 275 | 271 | ||
