Bug 9229

Summary: Layers from layer index not available when using local Yocto release
Product: [Build System, Metadata & Runtime] Toaster Reporter: Henry Bruce <henry.bruce>
Component: toasterAssignee: Belen Barros Pena <belen.barros.pena>
Status: VERIFIED FIXED QA Contact: Alexandru Roman <alexandru.costinx.roman>
Severity: normal    
Priority: Medium CC: alexandru.costinx.roman, belen.barros.pena, jessica.zhang, stanciux.mihail
Version: unspecified   
Target Milestone: 2.1 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)
Bug Depends on:    
Bug Blocks: 9858    

Description Henry Bruce 2016-03-08 23:35:23 UTC
Expected Behavior
-----------------
If I choose local "Local Yocto Project" as my Yocto release, I should also see layers from layer index and be able to add them.

Observed Behavior
-----------------
If I choose local "Local Yocto Project" as my Yocto release, I don't see layers from layer index and have to manually import them.
Comment 1 Belen Barros Pena 2016-03-09 09:28:45 UTC
We have come to find this "expected", although it might not be, and it requires some explaining.

Toaster supports building with different Yocto Project releases: currently, the master branch and Jethro. To avoid build failures related to incompatibility between versions, Toaster only shows you the layers from the layer index that are available for your selected release. So, if you create a project in Toaster and select the Jethro release, you only see layers from the layer index that have a Jethro branch

http://layers.openembedded.org/layerindex/branch/jethro/layers/

If you create a project in Toaster and select the master release you only see layers from the layer index that have a master branch

http://layers.openembedded.org/layerindex/branch/master/layers/

This stops users from shooting themselves in the foot, as they often do, by mixing layers from different branches and trying to build them with the wrong bitbake versions.

Toaster also supports what we call the "Local release". This is very much geared to people who set up Toaster locally in their development machines, and it allows them to work with the metadata and bitbake versions they have selected locally. The problem is that we don't know which branch they have checked out at any point in time, and we don't know if that branch is or not compatible with different metadata versions. Therefore, we cannot work out which layers from the layer index we can safely show you for building. 

If you are working with the "local release", you must manually import into Toaster any additional layers you might want to build, and we expect you to understand that those layers must be compatible with the version of bitbake you are using to build. 

What are the alternatives to this behaviour?

1. Find out which branch you have checked out and try to match it to metadata branches from the layer index. If we find a match, we show you the layers. There is still a risk that your local branch has changes in it that cause incompatibilities with the corresponding upstream branch, even if the names match.

2. Show you all the layers from the layer index and the branches each of them provide, and you are responsible to select the branch that will build with your local version of bitbake. This is the solution advocated by Paul Eggleton, who agrees with providing sane defaults when it comes to layer versions, but also would like the power to override those defaults. We have features open for that: bug 6701 and bug 6640

I am inclined to close this, unless Henry is not happy about it and has some additional suggestions.
Comment 2 Stephen K Jolley 2016-03-09 16:39:17 UTC
Henry - Please comment
Comment 3 Henry Bruce 2016-03-10 17:20:24 UTC
I was using the local release just for poky due to build instability introduced by meta-poky. I can see the possible problems of combining local release with layer index. I like Belen's option (2). Perhaps it could to go onto a feature backlog?

In the meantime documentation should be updated to state that selecting local relase prevents use of layer index.
Comment 4 Henry Bruce 2016-03-11 18:46:26 UTC
As I have been thinking through the "new" Yocto workflow, I realized that developers using devtool  will be forced into using a "local" Yocto release when creating their layer. This means that devtool users will not be able to benefit from the layer index.
Comment 5 Belen Barros Pena 2016-03-14 14:34:33 UTC
(In reply to comment #4)
> As I have been thinking through the "new" Yocto workflow, I realized that
> developers using devtool  will be forced into using a "local" Yocto release
> when creating their layer. This means that devtool users will not be able to
> benefit from the layer index.

This is good to know, and makes improving the layer management workflow a bit more urgent. I've tentatively set the milestone of bug 6701 to 2.2

> In the meantime documentation should be updated to state that selecting local > relase prevents use of layer index.

I will send a patch for the Toaster manual.
Comment 6 Belen Barros Pena 2016-03-15 15:24:28 UTC
Patch submitted to the Toaster mailing list

https://lists.yoctoproject.org/pipermail/toaster/2016-March/004160.html
Comment 7 Belen Barros Pena 2016-03-16 17:57:12 UTC
The explanation of the local release is now in the latest version of the manual

http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#a-note-on-the-local-yocto-project-release

Marking this as resolved.
Comment 8 Alexandru Roman 2016-05-04 12:46:21 UTC
Verified.