Bug 3162 - Beta - Hob has a badly formed error message when loading the meta-dlna layer
Summary: Beta - Hob has a badly formed error message when loading the meta-dlna layer
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: High major
Target Milestone: 1.3 M5
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard: (patch review)
Depends on:
Blocks:
 
Reported: 2012-09-24 21:15 UTC by Dave Stewart
Modified: 2012-10-18 11:41 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
Screen shot of Unable to parse %s (6.16 KB, image/png)
2012-09-24 21:15 UTC, Dave Stewart
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Stewart 2012-09-24 21:15:37 UTC
Created attachment 837 [details]
Screen shot of Unable to parse %s

To reproduce:

1. Use Hob to load the meta-dlna layer.]
2. Select a machine like qemux86.
3. resulting error message is "Error Unable to parse %s"

See screenshot attached.

I realize that the README for this layer says it should be used with Denzil and I'm running on the v1.3 beta. But it doesn't matter... the error message should be better.
Comment 1 Paul Eggleton 2012-09-25 00:00:09 UTC
So the good news is I've already fixed the broken expansion of the error message resulting in "Unable to parse %s" and the fix is already in master; however, it's still not perfect - it only tells you which file failed to parse; what caused the parse failure is not reported - when running bitbake from the command line these are printed as NOTEs but these are explicitly not shown within hob:

NOTE: Error expanding variable populate_packages
NOTE: Error during finalise of /home/paul/poky/meta-dlna/meta-guacamayo/recipes-devtools/orc/orc_0.4.14.bb
ERROR: Unable to parse /home/paul/poky/meta-dlna/meta-guacamayo/recipes-devtools/orc/orc_0.4.14.bb

FYI this is caused by the tabs->spaces change between denzil and 1.3; when it says it's only compatible with denzil it really means it ;)
Comment 2 Dave Stewart 2012-09-25 04:53:42 UTC
Thanks... Since we have recently tightened up the syntactic requirements for metadata, could we please check for that and report it out explicitly?
Comment 3 Paul Eggleton 2012-09-25 15:31:22 UTC
I've sent out a patch to improve the message so that it at least prints as much information as we have as far as the exception goes:

ERROR: ExpansionError during parsing /path/to/recipename.bb: Failure expanding variable populate_packages: IndentationError: unindent does not match any outer indentation level (<string>, line 4)

Obviously this is still not very informative for a random user using a random layer that happens not to be compatible with the current version of the build system. I've also sent a patch to add a layer version to OE-Core which will at least allow external layers to depend on the new version; we don't have a mechanism to help with the situation at hand for this bug report though (where older layers that have not been updated are used in conjunction with current OE-Core).

We do report the use of tabs in python functions as a warning. I looked into displaying warnings in hob, which we probably ought to do anyway; however I think this is too much to squeeze into 1.3 as it has design implications - we don't really want to bring up a dialog box every time just for warnings and we have no other way of displaying such information to the user during parse time.