Bug 4909 - Improve the error message for tray bblayers.conf files
Summary: Improve the error message for tray bblayers.conf files
Status: RESOLVED WONTFIX
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Low enhancement
Target Milestone: Future
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-07-25 08:44 UTC by Laszlo Papp
Modified: 2017-06-20 10:40 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Papp 2013-07-25 08:44:54 UTC
"ERROR: Unable to parse /home/lpapp/Projects/poky/meta-yocto-bsp/conf/layer.conf: [Errno 2] No such file or directory: '/home/lpapp/Projects/poky/meta-yocto-bsp/conf/layer.conf'

=> This might be intuitive for a developer, but not for an end user. Clearly, I got a wrong layer file once checking out the denzil branch from dylan.

I would suggest to give hints to the users like "forgot to regenerate?". It would make it totally clear for the end users, then. It is like the common root case of the issues, but hints would be appreciated, anyhow.

I could not have known what to do without further assistance.
Comment 1 Ross Burton 2013-07-25 09:21:14 UTC
The error is "file not found", and explicitly referring to layers that don't exist is probably one of the rarer causes of this, the more common one being a typo.  There's no way for bitbake to know the difference between you making a typo ("meta-yacto") or referring to a layer that only exists in the future ("meta-yocto-bsp", on Denzil).

The incompatible change situation is covered by the LCONF_VERSION flag already, which will catch you using a Dylan bblayers.conf with Denzil.  The parsing order could be improved as the sanity test happens *after* the layer parse.
Comment 2 Laszlo Papp 2013-07-25 09:24:30 UTC
Actually, even a typo hint could be added as it could be known what layers exist when doing this. See the Levenshtein distance for details.

Note, how git for instance handles that when you mistype something slightly.

That is a different use case though to invalid bblayers.conf which I had issue with.
Comment 3 Richard Purdie 2017-06-20 10:40:35 UTC
Upon reviewing this, "file not found" seems to be a clear error and I'm not sure we have any plans to add further diagnostics to the code. Patches to aid usability are welcome but we have no plans for this.