diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-11-06 20:18:42 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-13 14:21:16 +0000 |
commit | 41125ddc8651494ffcf888d3b5efce1ae6d953bb (patch) | |
tree | 000dd838fb7413e5b84d4e6e9c9ba4de67151d9d | |
parent | 4e2b5a59299610c06f9a5fb6fcd103d6946da41a (diff) | |
download | poky-41125ddc8651494ffcf888d3b5efce1ae6d953bb.tar.gz |
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>
-rw-r--r-- | bitbake/lib/bb/cooker.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index e299059401..5f88f1ff59 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -313,6 +313,10 @@ class BBCooker: | |||
313 | elif len(pkgs_to_build) == 1: | 313 | elif len(pkgs_to_build) == 1: |
314 | self.updateCache() | 314 | self.updateCache() |
315 | 315 | ||
316 | ignore = self.configuration.data.getVar("ASSUME_PROVIDED", True) or "" | ||
317 | if pkgs_to_build[0] in set(ignore.split()): | ||
318 | bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) | ||
319 | |||
316 | localdata = data.createCopy(self.configuration.data) | 320 | localdata = data.createCopy(self.configuration.data) |
317 | bb.data.update_data(localdata) | 321 | bb.data.update_data(localdata) |
318 | bb.data.expandKeys(localdata) | 322 | bb.data.expandKeys(localdata) |