<?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>11579</bug_id>
          
          <creation_ts>2017-05-25 02:10:15 +0000</creation_ts>
          <short_desc>LAYERDEPENDS variable usage not correct</short_desc>
          <delta_ts>2017-06-15 13:31:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>BitBake User Manual</product>
          <component>bitbake-manual</component>
          <version>2.3.1</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>15 June 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chen Qi">Qi.Chen</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</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>73496</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2017-05-25 02:10:15 +0000</bug_when>
    <thetext>Recently I found that the usage of LAYERDEPENDS in doc is not correct.

http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#var-LAYERDEPENDS

&quot;&quot;&quot;
Optionally, you can specify a specific layer version for a dependency by adding it to the end of the layer name with a colon, (e.g. &quot;anotherlayer:3&quot; to be compared against LAYERVERSION_anotherlayer in this case)
&quot;&quot;&quot;

The correct usage is like below.
LAYERDEPENDS_mylayer = &quot;anotherlayer (=3)&quot;

Also, there&apos;s a variable called LAYERRECOMMENDS, its usage is like LAYERDEPENDS and it hasn&apos;t been documented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73505</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-05-25 13:53:26 +0000</bug_when>
    <thetext>Hi, 

Both the reference manual and the BitBake manual have glossary definitions for the LAYERDEPENDS variable.  I have updated the definition in the reference manual for review.  Once we are happy with that definition, I will make the same changes in the BitBake manual here - http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#var-LAYERDEPENDS.

See http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#var-LAYERDEPENDS in the reference manual for the updated glossary definition of LAYERDEPENDS.

----------

Regarding the variable LAYERRECOMMENDS:  My assumption is that since we are dealing with &quot;recommends&quot; here, the definition would indicate that the build does not depend on the list of layers in LAYERRECOMMENDS but rather the layers are recommended.  I can&apos;t really say why they are recommended.  If there is some general reason why the user would recommend the layers we should state so.  I also am assuming the syntax for using LAYERRECOMMENDS is identical to that of LAYERDEPENDS.  And, that we would want to document LAYERRECOMMENDS in the BitBake Manual as well.  

Following is a first start of a definition for LAYERRECOMMENDS, which simply uses the same form as the wordings for the LAYERDEPENDS variable.  I am sure we need more information here for the user.  Please correct it or suggest more information as needed.  I am not sure how the user would apply this variable... layer.conf file?  

LAYERRECOMMENDS: 
  Lists the layers, separated by spaces, recommended for this recipe. 
  Optionally, you can specify a specific layer version for a recommendation
  by adding the version to the end of the layer name. Here is an example:

         LAYERRECOMMENDS_mylayer = &quot;anotherlayer (=3)&quot;
                        

    In this previous example, version 3 of &quot;anotherlayer&quot; is compared against
    LAYERVERSION_anotherlayer.

    An error is produced if any dependency is missing or the version numbers 
    (if specified) do not match exactly. This variable is used in the
    conf/layer.conf file and must be suffixed with the name of the specific 
    layer (e.g. LAYERRECOMMENDS_mylayer).


Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73515</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-05-25 20:28:43 +0000</bug_when>
    <thetext>&quot;recommended for this recipe&quot; -&gt; &quot;recommended for use with this layer&quot;. Otherwise the text looks good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73645</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-06-02 14:36:11 +0000</bug_when>
    <thetext>Hi, 

See http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#var-LAYERRECOMMENDS for the entry in the ref-manual for LAYERRECOMMENDS.  

See http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#var-LAYERDEPENDS for the updated LAYERDEPENDS variable in the BB manual. 

See http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#var-LAYERRECOMMENDS for the new LAYERRECOMMENDS variable in the BB manual.

This should complete the work for this bug.  Let me know. 

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73711</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-06-05 22:31:55 +0000</bug_when>
    <thetext>Still needs a review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73721</commentid>
    <comment_count>5</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2017-06-06 01:53:49 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Still needs a review.

Hi Scott,

Sorry for the late reply.
The contents look good. There&apos;s only one problem. For LAYERRECOMMENDS, there would be no error.
The logging level is as below (in bitbake/lib/bb/cooker.py):
parselog.debug(3,&quot;Layer &apos;%s&apos; recommends layer &apos;%s&apos;, but this layer is not enabled in your configuration&quot;, c, rec)

So for LAYERRECOMMENDS, there would be no error or warning, we can only observe the information when using &apos;-DDD&apos; option for bitbake.

Regards,
Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74165</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-06-14 19:56:50 +0000</bug_when>
    <thetext>Hi Chen, 

Look at http://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html#var-LAYERRECOMMENDS and let me know if this is okay.  I could say something about -DDD (BitBake debug mode) but I am not sure what to say.  I don&apos;t exactly know what it means when you say &quot;observe the information&quot; when using -DDD.  

The variable seems to be used to simply list recommended layers for use with a specific layer.  What does using -DDD do for the user in this case regarding this variable?

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74180</commentid>
    <comment_count>7</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2017-06-15 03:13:07 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; Hi Chen, 
&gt; 
&gt; Look at
&gt; http://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html#var-
&gt; LAYERRECOMMENDS and let me know if this is okay.  I could say something
&gt; about -DDD (BitBake debug mode) but I am not sure what to say.  I don&apos;t
&gt; exactly know what it means when you say &quot;observe the information&quot; when using
&gt; -DDD.  
&gt; 
&gt; The variable seems to be used to simply list recommended layers for use with
&gt; a specific layer.  What does using -DDD do for the user in this case
&gt; regarding this variable?
&gt; 
&gt; Thanks,
&gt; Scott

I think the doc is OK.

Telling the user about &apos;bitbake -DDD&apos; seems to go too far.
To clarify what I mean by saying &apos;observe the information&apos;, I&apos;ll give out an example below.
Say we have in meta-gplv2 layer:
LAYERRECOMMENDS_gplv2 = &quot;meta-gplv2-dl (=2.3)&quot;
And we have in meta-gplv2-dl-2.3 layer:
LAYERVERSION_meta-gplv2-dl = &quot;1&quot;
We execute `bitbake &lt;anything&gt;&apos;, and we would see nothing about version mismatch.
We execute `bitbake -DDD &lt;anything&gt;&apos;, and we would see the following message.

DEBUG: Layer &apos;gplv2&apos; recommends version = 2.3 of layer &apos;meta-gplv2-dl&apos;, but version 1 is currently enabled in your configuration. Check that you are using the correct matching versions/branches of these two layers.

However, this message is among thousands of DEBUG messages, so we need to redirect the log and grep the log to find this message.
e.g.
bitbake -DDD base-passwd &gt; temp.log
grep meta-gplv2 temp.log

To summarize, I think the doc is OK and sufficient.

Best Regards,
Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74186</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-06-15 08:04:18 +0000</bug_when>
    <thetext>I&apos;m not sure there&apos;s much point telling people to use bitbake -DDD here, they aren&apos;t going to get much out of it. I think the only thing we would want to say is that it doesn&apos;t really affect BitBake&apos;s operation and at the moment is only really there for the benefit of external tools.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74198</commentid>
    <comment_count>9</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-06-15 13:12:54 +0000</bug_when>
    <thetext>Thanks, 

I am setting this to RESOLVED and putting the doc flag to &quot;done&quot;.  I will put the change in the 2.3 and 2.3.1 manual sets.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74200</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-06-15 13:23:24 +0000</bug_when>
    <thetext>Oops.. I meant 2.2 and 2.2.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74201</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-06-15 13:31:51 +0000</bug_when>
    <thetext>Brother... I must not be awake this morning :)

backporting to 2.3 and 2.3.1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>