bitbake: print clear message for "bitbake -e ASSUME_PROVIDED"
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 6 Nov 2012 12:18:42 +0000 (20:18 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Nov 2012 14:21:16 +0000 (14:21 +0000)
commit5dd2a291bb682bcfdae14f4210fee1535741b670
tree5ba70fdc660c977fc9707f0bb574343c1cc20465
parenta7faa2e81f914db87cc11fb81fb249c22acdbb80
bitbake: print clear message for "bitbake -e ASSUME_PROVIDED"

"bitbake -e ASSUME_PROVIDED" should fail, but the error message wasn't
clear enough in the past:

$ bitbake -e bzip2-native
[snip]
ERROR: Command execution failed: Traceback (most recent call last):
  File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 94, in
runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 323, in
showEnvironmentTarget
    command.cooker.showEnvironment(None, pkg)
  File "/buildarea/lyang1/poky/bitbake/lib/bb/cooker.py", line 325, in
showEnvironment
    fnid = taskdata.build_targets[targetid][0]
KeyError: 0
[snip]

With this patch, the massage will be:
[snip]
ERROR: bzip2-native is in ASSUME_PROVIDED
ERROR: Command execution failed: Exited with 1

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

[YOCTO #3392]

(Bitbake rev: f31447dac92454c822d4ebb7dd48e96c6c69dde4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cooker.py