Currently we have multiple openembedded-core layers appearing in the UI, we 
have some mechanisms to conflate these layers but these have been proven to be 
fragile and cause issues when trying to relate the layer <-> recipe <-> build 
information.

What this patch does is check when downloading layers from the layer index as 
to whether this layer already exists. The flow is like this:


1 - Load toasterconf.json (toasterconf.json specifies a layer 
'openembedded-core' as a local layer as this is included in poky)

2 - Layer 'openembedded-core' is created in database

3 - Layer Version HEAD or "Local" is created and no other versions

4 - Layer index update is triggered this then pulls in all the available layers 
for the releases specified in the toasterconf.json all these new layers are 
assigned to the layer_source of layerindex.

5 - If a layer by the name of openembedded-core comes in when loading from the 
layer index we see if this layer already exists from a different layer_source. 
If it does exist the layer's layer_source is then taken over by the layer index 
and the metadata from the layer index then updates this layer (though not all 
fields). The layer index then will continue in the normal way in downloading 
layer versions for this layer e.g. master, fido and dizzy. (Rather than 
creating these layers versions from toasterconf.json

This means that when you start up toaster we now have recipes and machines and 
meta data about the 3 default core layers allowing selecting any of these 
things without having to remove the default layers and add them from the layer 
index version of this (where it gets further confused because it thinks that 
openembedded-core is inherently inside poky).

There is a further issue to solve where the build information coming back 
doesn't relate back to (any?) of the layers, but I think this is orthogonal as 
the built layer has a different revision so doesn't match the existing one. 
e.g. layer master built turn into 'layer abcdef1234' which then appears to be a 
new layer.

Michael Wood (1):
  toaster: Special case the openembedded-core layer to avoid duplicates

 bitbake/lib/toaster/orm/models.py | 21 +++++++++++++++++++++
 meta-yocto/conf/toasterconf.json  |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)

-- 
2.1.4

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to