Bug 9865 - "inherit" invalid in .inc file when included in distro config
Summary: "inherit" invalid in .inc file when included in distro config
Status: RESOLVED INVALID
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M3
Assignee: Patrick Ohly
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-07-01 12:24 UTC by Patrick Ohly
Modified: 2016-09-14 14:13 UTC (History)
3 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 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.