summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-07-19 11:56:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-21 08:41:12 +0100
commit21bb330f4632ae9e8dd9eaff2879bcd24f9cf194 (patch)
tree476a3ff0b5d7fc0f89fafc0cba2b720a6e6b5f3e /bitbake/lib/bb/ui/toasterui.py
parenteb7401d47087ba2347dcf780a0d07969bed4c072 (diff)
downloadpoky-21bb330f4632ae9e8dd9eaff2879bcd24f9cf194.tar.gz
bitbake: lib/bb/event: refactor printing events
We really ought to have just one place where the string representation of these events is produced. This doesn't take any real control away from the UI - if an alternative representation is desired, that can still be made. (Bitbake rev: cb15db2a799be6d8eab9a2a43a9a573f89229cff) 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/ui/toasterui.py')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py25
1 files changed, 4 insertions, 21 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 71f04fa5ce..88cec37592 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -320,29 +320,13 @@ def main(server, eventHandler, params):
320 if isinstance(event, bb.event.CacheLoadCompleted): 320 if isinstance(event, bb.event.CacheLoadCompleted):
321 continue 321 continue
322 if isinstance(event, bb.event.MultipleProviders): 322 if isinstance(event, bb.event.MultipleProviders):
323 logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "", 323 logger.info(str(event))
324 event._item,
325 ", ".join(event._candidates))
326 logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
327 continue 324 continue
328 325
329 if isinstance(event, bb.event.NoProvider): 326 if isinstance(event, bb.event.NoProvider):
330 errors = errors + 1 327 errors = errors + 1
331 if event._runtime: 328 text = str(event)
332 r = "R"
333 else:
334 r = ""
335
336 if event._dependees:
337 text = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
338 else:
339 text = "Nothing %sPROVIDES '%s'" % (r, event._item)
340
341 logger.error(text) 329 logger.error(text)
342 if event._reasons:
343 for reason in event._reasons:
344 logger.error("%s", reason)
345 text += reason
346 buildinfohelper.store_log_error(text) 330 buildinfohelper.store_log_error(text)
347 continue 331 continue
348 332
@@ -364,8 +348,7 @@ def main(server, eventHandler, params):
364 if isinstance(event, bb.runqueue.runQueueTaskFailed): 348 if isinstance(event, bb.runqueue.runQueueTaskFailed):
365 buildinfohelper.update_and_store_task(event) 349 buildinfohelper.update_and_store_task(event)
366 taskfailures.append(event.taskstring) 350 taskfailures.append(event.taskstring)
367 logger.error("Task (%s) failed with exit code '%s'", 351 logger.error(str(event))
368 event.taskstring, event.exitcode)
369 continue 352 continue
370 353
371 if isinstance(event, (bb.runqueue.sceneQueueTaskCompleted, bb.runqueue.sceneQueueTaskFailed)): 354 if isinstance(event, (bb.runqueue.sceneQueueTaskCompleted, bb.runqueue.sceneQueueTaskFailed)):
@@ -382,7 +365,7 @@ def main(server, eventHandler, params):
382 if isinstance(event, bb.command.CommandFailed): 365 if isinstance(event, bb.command.CommandFailed):
383 errors += 1 366 errors += 1
384 errorcode = 1 367 errorcode = 1
385 logger.error("Command execution failed: %s", event.error) 368 logger.error(str(event))
386 elif isinstance(event, bb.event.BuildCompleted): 369 elif isinstance(event, bb.event.BuildCompleted):
387 buildinfohelper.scan_image_artifacts() 370 buildinfohelper.scan_image_artifacts()
388 buildinfohelper.clone_required_sdk_artifacts() 371 buildinfohelper.clone_required_sdk_artifacts()