From 21bb330f4632ae9e8dd9eaff2879bcd24f9cf194 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 19 Jul 2017 11:56:03 +0200 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/taskexp.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'bitbake/lib/bb/ui/taskexp.py') diff --git a/bitbake/lib/bb/ui/taskexp.py b/bitbake/lib/bb/ui/taskexp.py index 9d14ecefaf..0d0f9f5a40 100644 --- a/bitbake/lib/bb/ui/taskexp.py +++ b/bitbake/lib/bb/ui/taskexp.py @@ -286,23 +286,7 @@ def main(server, eventHandler, params): continue if isinstance(event, bb.event.NoProvider): - if event._runtime: - r = "R" - else: - r = "" - - extra = '' - if not event._reasons: - if event._close_matches: - extra = ". Close matches:\n %s" % '\n '.join(event._close_matches) - - if event._dependees: - print("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s" % (r, event._item, ", ".join(event._dependees), r, extra)) - else: - print("Nothing %sPROVIDES '%s'%s" % (r, event._item, extra)) - if event._reasons: - for reason in event._reasons: - print(reason) + print(str(event)) _, error = server.runCommand(["stateShutdown"]) if error: @@ -310,7 +294,7 @@ def main(server, eventHandler, params): break if isinstance(event, bb.command.CommandFailed): - print("Command execution failed: %s" % event.error) + print(str(event)) return event.exitcode if isinstance(event, bb.command.CommandExit): -- cgit v1.2.3-54-g00ecf