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 """ 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. "anotherlayer:3" to be compared against LAYERVERSION_anotherlayer in this case) """ The correct usage is like below. LAYERDEPENDS_mylayer = "anotherlayer (=3)" Also, there's a variable called LAYERRECOMMENDS, its usage is like LAYERDEPENDS and it hasn't been documented.
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 "recommends" 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'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 = "anotherlayer (=3)" In this previous example, version 3 of "anotherlayer" 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
"recommended for this recipe" -> "recommended for use with this layer". Otherwise the text looks good.
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
Still needs a review.
(In reply to comment #4) > Still needs a review. Hi Scott, Sorry for the late reply. The contents look good. There'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,"Layer '%s' recommends layer '%s', but this layer is not enabled in your configuration", c, rec) So for LAYERRECOMMENDS, there would be no error or warning, we can only observe the information when using '-DDD' option for bitbake. Regards, Chen Qi
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't exactly know what it means when you say "observe the information" 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
(In reply to comment #6) > 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't > exactly know what it means when you say "observe the information" 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 I think the doc is OK. Telling the user about 'bitbake -DDD' seems to go too far. To clarify what I mean by saying 'observe the information', I'll give out an example below. Say we have in meta-gplv2 layer: LAYERRECOMMENDS_gplv2 = "meta-gplv2-dl (=2.3)" And we have in meta-gplv2-dl-2.3 layer: LAYERVERSION_meta-gplv2-dl = "1" We execute `bitbake <anything>', and we would see nothing about version mismatch. We execute `bitbake -DDD <anything>', and we would see the following message. DEBUG: Layer 'gplv2' recommends version = 2.3 of layer 'meta-gplv2-dl', 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 > temp.log grep meta-gplv2 temp.log To summarize, I think the doc is OK and sufficient. Best Regards, Chen Qi
I'm not sure there's much point telling people to use bitbake -DDD here, they aren't going to get much out of it. I think the only thing we would want to say is that it doesn't really affect BitBake's operation and at the moment is only really there for the benefit of external tools.
Thanks, I am setting this to RESOLVED and putting the doc flag to "done". I will put the change in the 2.3 and 2.3.1 manual sets. Scott
Oops.. I meant 2.2 and 2.2.1
Brother... I must not be awake this morning :) backporting to 2.3 and 2.3.1