Bug 11498 - INHERIT description ambiguous
Summary: INHERIT description ambiguous
Status: RESOLVED FIXED
Alias: None
Product: Development Manual
Classification: Documentation
Component: development (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 19 May 2017: RESOLVED
Depends on:
Blocks:
 
Reported: 2017-05-11 06:38 UTC by Patrick Ohly
Modified: 2017-05-19 20:04 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Ohly 2017-05-11 06:38:16 UTC
Currently it says:

INHERIT

    Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files. 

"this point" - which point? Not the point where the variable is set...

"in configuration files" - is a .inc file a configuration file?

I think what this is trying to say is that INHERIT can only be used as part of the base configuration (distro, machine, local configuration) and will inherit that class in the base configuration and each individual recipe.

Perhaps phrase it like this:

   Causes the named class(es) to be inherited globally. Anonymous functions in it will get executed for the base configuration and in each individual recipe. Changes to this variable in individual recipes are ignored.
Comment 1 Patrick Ohly 2017-05-11 06:39:08 UTC
Richard, please check my enhancement proposal.
Comment 2 Richard Purdie 2017-05-11 14:56:15 UTC
This is basically correct but anonymous functions in it are probably not executed in the base configuration.
Comment 3 Scott Rifenbark 2017-05-11 19:03:35 UTC
Hi, 

The glossaries of the BB Manual and the ref-manual both have INHERIT documented.  I have updated each of these to match based on the comments below.  Please look over the new description and let me know of any further changes.  

Also, there is a section on INHERIT in Chapter 3 of the BB manual.  This section was not cross-referenced to the INHERIT variable in the BB manual glossary.  I have cross-referenced it back to that variable.  It might be worthwhile reading that section to see if it is still okay.  

Here are the various links to the sections that have changed:

 * The INHERIT glossary entry in the YP Dev manual - http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#var-INHERIT

 * The INHERIT glossary entry in the YP BB manual - http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#var-INHERIT

 * The section on how INHERIT is used in the BB manual - http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#inherit-configuration-directive

Thanks, 
Scott
Comment 4 Patrick Ohly 2017-05-15 11:31:48 UTC
Now that you've mentioned it, I also checked:
http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#inherit-configuration-directive

It says:

This configuration directive causes the named class to be inherited at the point of the directive during parsing.

That's just not right. "the directive" presumably means the "INHERIT +=" statement, and that's not when the class gets inherited.

I suggest replacing "at the point of the directive during parsing" with "after parsing the base configuration".

Also add (because it is relevant, and the glossary shouldn't have more information than the detailed section):

Anonymous functions in the class or classes are not executed for the base configuration and in each individual recipe. The OpenEmbedded build system ignores changes to INHERIT in individual recipes.
Comment 5 Scott Rifenbark 2017-05-19 15:55:52 UTC
Hi Patrick, 

See http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#inherit-configuration-directive for the changes and let me know if this is good.  

Thanks,
Scott
Comment 6 Patrick Ohly 2017-05-19 16:06:32 UTC
(In reply to comment #5)
> Hi Patrick, 
> 
> See
> http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.
> html#inherit-configuration-directive for the changes and let me know if this
> is good.  

I find "Anonymous functions in the class or classes are not executed for the base configuration and in each individual recipe." misleading.

It might be misunderstood as "Anonymous functions in the class or classes are neither executed for the base configuration nor in each individual recipe.".

I suggest "Anonymous functions in the class or classes are not executed for the base configuration. Instead they run once in each individual recipe."

I also just noticed that the final example is broken (the section is about INHERIT, not inherit):

inherit autotools pkgconfig => INHERIT += "buildhistory archiver"
Comment 8 Patrick Ohly 2017-05-19 17:04:38 UTC
That's good now.
Comment 9 Scott Rifenbark 2017-05-19 20:04:34 UTC
Thanks - setting the doc flag to "done."

Scott