<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11498</bug_id>
          
          <creation_ts>2017-05-11 06:38:16 +0000</creation_ts>
          <short_desc>INHERIT description ambiguous</short_desc>
          <delta_ts>2017-05-19 20:04:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Development Manual</product>
          <component>development</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>19 May 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>patrick.ohly</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73182</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-11 06:38:16 +0000</bug_when>
    <thetext>Currently it says:

INHERIT

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

&quot;this point&quot; - which point? Not the point where the variable is set...

&quot;in configuration files&quot; - 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73183</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-11 06:39:08 +0000</bug_when>
    <thetext>Richard, please check my enhancement proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73194</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-05-11 14:56:15 +0000</bug_when>
    <thetext>This is basically correct but anonymous functions in it are probably not executed in the base configuration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73215</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-05-11 19:03:35 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73256</commentid>
    <comment_count>4</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-15 11:31:48 +0000</bug_when>
    <thetext>Now that you&apos;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&apos;s just not right. &quot;the directive&quot; presumably means the &quot;INHERIT +=&quot; statement, and that&apos;s not when the class gets inherited.

I suggest replacing &quot;at the point of the directive during parsing&quot; with &quot;after parsing the base configuration&quot;.

Also add (because it is relevant, and the glossary shouldn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73379</commentid>
    <comment_count>5</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-05-19 15:55:52 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73381</commentid>
    <comment_count>6</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-19 16:06:32 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Hi Patrick, 
&gt; 
&gt; See
&gt; http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.
&gt; html#inherit-configuration-directive for the changes and let me know if this
&gt; is good.  

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

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

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

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

inherit autotools pkgconfig =&gt; INHERIT += &quot;buildhistory archiver&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73382</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-05-19 16:22:08 +0000</bug_when>
    <thetext>Hi Patrick, 

How is this now?

http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#inherit-configuration-directive

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73384</commentid>
    <comment_count>8</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-19 17:04:38 +0000</bug_when>
    <thetext>That&apos;s good now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73388</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-05-19 20:04:34 +0000</bug_when>
    <thetext>Thanks - setting the doc flag to &quot;done.&quot;

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>