<?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>9909</bug_id>
          
          <creation_ts>2016-07-12 00:33:34 +0000</creation_ts>
          <short_desc>Suggested clarification re. implementation and limitations of BBCLASSEXTEND</short_desc>
          <delta_ts>2016-07-16 18:54:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</component>
          <version>2.3</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>16 July 2016: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulfalizer</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>63824</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-12 00:33:34 +0000</bug_when>
    <thetext>BBCLASSEXTEND and its limitations are easier to understand when you have some idea of how it is implemented (going on personal experience). I suggest adding the following as a note to the glossary entries for BBCLASSEXTEND in the Yocto Project Reference Manual and in the BitBake User Manual. BBCLASSEXTEND appears in both glossaries.


&quot;Internally, the BBCLASSEXTEND mechanism generates recipe variants by rewriting
variable values and applying overrides such as _class-native. For example, to
generate a native version of a recipe, a DEPENDS on foo is rewritten to a
DEPENDS on foo-native.

No reparsing of the recipe is done for each variant, which adds some
limitations. For example, it is not possible to &apos;include&apos; a different file
depending on the variant, since &apos;include&apos;s are processed when the recipe is
parsed.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63883</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-12 21:11:20 +0000</bug_when>
    <thetext>Hi, 

Check out both variables here for the additional Note:

 * http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-BBCLASSEXTEND

 * http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#var-BBCLASSEXTEND

Let me know.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63906</commentid>
    <comment_count>2</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-13 01:44:43 +0000</bug_when>
    <thetext>This makes it sound like it&apos;s the reparsing and not the lack of it that adds limitations:

&quot;No reparsing, which adds some limitations, of the recipe is done for each variant. For example, it is not possible to &quot;include&quot; a different file depending on the variant, since &quot;include&apos;s&quot; are processed when the recipe is parsed.&quot;

How about this? Should be clearer than the original version.

&quot;Even when using BBCLASSEXTEND, the recipe is only parsed once. This adds some limitations. For example, it is not possible to &quot;include&quot; a different file depending on the variant, since &quot;include&apos;s&quot; are processed when the recipe is parsed.&quot;

Also, I&apos;d use code highlighting for &quot;include&quot;/&quot;include&apos;s&quot; and remove the quotation marks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63961</commentid>
    <comment_count>3</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-14 03:19:31 +0000</bug_when>
    <thetext>Saw one more thing:

  For example, to generate a native version of a recipe named &quot;foo&quot;, a DEPENDS on &quot;foo&quot; is rewritten...

should be

  For example, to generate a native version of a recipe, a DEPENDS on &quot;foo&quot; is rewritten...

&quot;foo&quot; is just the dependency, not the name of the recipe itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64004</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-14 19:55:13 +0000</bug_when>
    <thetext>Ulf, 

Here are the links....

 * http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-BBCLASSEXTEND

 * http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#var-BBCLASSEXTEND

Identical changes in both manuals.  Let me know. 

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64023</commentid>
    <comment_count>5</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-07-15 05:57:49 +0000</bug_when>
    <thetext>Looks good to me. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64078</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-07-16 18:54:46 +0000</bug_when>
    <thetext>Thanks!

I have changed the status to resolved and set the doc flag to &quot;Done.&quot;

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>