diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-07-19 11:56:03 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-21 08:41:12 +0100 |
| commit | 21bb330f4632ae9e8dd9eaff2879bcd24f9cf194 (patch) | |
| tree | 476a3ff0b5d7fc0f89fafc0cba2b720a6e6b5f3e /bitbake/lib/bb/ui/taskexp.py | |
| parent | eb7401d47087ba2347dcf780a0d07969bed4c072 (diff) | |
| download | poky-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/taskexp.py')
| -rw-r--r-- | bitbake/lib/bb/ui/taskexp.py | 20 |
1 files changed, 2 insertions, 18 deletions
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): | |||
| 286 | continue | 286 | continue |
| 287 | 287 | ||
| 288 | if isinstance(event, bb.event.NoProvider): | 288 | if isinstance(event, bb.event.NoProvider): |
| 289 | if event._runtime: | 289 | print(str(event)) |
| 290 | r = "R" | ||
| 291 | else: | ||
| 292 | r = "" | ||
| 293 | |||
| 294 | extra = '' | ||
| 295 | if not event._reasons: | ||
| 296 | if event._close_matches: | ||
| 297 | extra = ". Close matches:\n %s" % '\n '.join(event._close_matches) | ||
| 298 | |||
| 299 | if event._dependees: | ||
| 300 | print("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s" % (r, event._item, ", ".join(event._dependees), r, extra)) | ||
| 301 | else: | ||
| 302 | print("Nothing %sPROVIDES '%s'%s" % (r, event._item, extra)) | ||
| 303 | if event._reasons: | ||
| 304 | for reason in event._reasons: | ||
| 305 | print(reason) | ||
| 306 | 290 | ||
| 307 | _, error = server.runCommand(["stateShutdown"]) | 291 | _, error = server.runCommand(["stateShutdown"]) |
| 308 | if error: | 292 | if error: |
| @@ -310,7 +294,7 @@ def main(server, eventHandler, params): | |||
| 310 | break | 294 | break |
| 311 | 295 | ||
| 312 | if isinstance(event, bb.command.CommandFailed): | 296 | if isinstance(event, bb.command.CommandFailed): |
| 313 | print("Command execution failed: %s" % event.error) | 297 | print(str(event)) |
| 314 | return event.exitcode | 298 | return event.exitcode |
| 315 | 299 | ||
| 316 | if isinstance(event, bb.command.CommandExit): | 300 | if isinstance(event, bb.command.CommandExit): |
