Bug 9865

Summary: "inherit" invalid in .inc file when included in distro config
Product: [Build System, Metadata & Runtime] BitBake Reporter: Patrick Ohly <patrick.ohly>
Component: bitbakeAssignee: Patrick Ohly <patrick.ohly>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 2.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Patrick Ohly 2016-07-01 12:24:00 UTC
The "inherit" statement is not valid in global configuration files like a distro configuration. Using it there correctly triggers an error.

However, when the global configuration file includes some other .inc file and that file has such a statement, no error is printed. The line seems to get ignored silently.

Restrictions that apply to the actual usage should also be applied when parsing in include files.
Comment 1 Richard Purdie 2016-09-14 14:00:28 UTC
I placed a "inherit bash" at the end of meta/conf/distro/include/default-distrovars.inc which is an incude file included by global configuration. I then see:

$ bitbake -p
ERROR: ParseError at /media/build1/poky/meta/conf/distro/include/default-distrovars.inc:50: Could not inherit file classes/bash.bbclass

which seems correct. How do I reproduce the problem you describe?
Comment 2 Patrick Ohly 2016-09-14 14:13:04 UTC
We ran into it when adding "inherit" to a distro configuration. But I can't reproduce that with current Poky either.

Let's assume that this was fixed somehow in the meantime or that the report was invalid.