bitbake: cooker: fix traceback when using -b with skipped recipe

If a recipe is skipped during parsing for whatever reason, check and
report this as an error rather than trying to use the data that is sent
back and failing.

Fixes [YOCTO #2976].

(Bitbake rev: a324df40243fa55ccc89fd5970d46f25330d0a0d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2012-08-22 16:14:38 +01:00 committed by Richard Purdie
parent 8d33395026
commit fddc16989d
1 changed files with 4 additions and 0 deletions

View File

@ -1060,6 +1060,10 @@ class BBCooker:
info_array = infos[fn]
except KeyError:
bb.fatal("%s does not exist" % fn)
if info_array[0].skipped:
bb.fatal("%s was skipped: %s" % (fn, info_array[0].skipreason))
self.status.add_from_recipeinfo(fn, info_array)
# Tweak some variables