Bug 8456

Summary: Add feature to add layers to Toaster from external source
Product: [Build System, Metadata & Runtime] Toaster Reporter: Michael Wood <michael.g.wood>
Component: toasterAssignee: Michael Wood <michael.g.wood>
Status: RESOLVED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: enhancement    
Priority: Medium CC: belen.barros.pena, jessica.zhang, stanciux.mihail
Version: 2.1   
Target Milestone: 2.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Michael Wood 2015-10-07 17:34:53 UTC
Add a feature to be able to add layers (globally rather than project specific) to Toaster from a pre-defined list of layers in a file which is picked up at start up.

Pre-defined layers would be
 - A layer name
 - A file location that the layer can be found in
 - What release that layer is valid for

This requires that toaster can:
 - Use layers from directories which are both git and non git sources (such as an extracted tar archive)
 - Load a config file to populate the layer information


History:

Originally we tried using the toasterconf.json but it is quite tricky because it's really an "internal" file to toaster for the purposes of switching between poky and openembedded setups. We also have the issue that toaster assumes that the layers are in git repositories. Work to avoid that assumption by Sujith has been done here and can be referred to when we implement this feature:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/Import-external-layers-toaster-and-error-fix

Proposed solution:

- Add a management command to load layers e.g. manage.py loadlayers yourlayers.conf
- Fix toaster git repository assumptions
Comment 1 Michael Wood 2015-10-07 19:03:04 UTC
Alternative solution would be to go back to the toasterconf.json and fix it so that it makes more sense for loading these pre-defined layers, releases, and also fix toaster git repository assumptions.
Comment 2 brian avery 2016-01-18 20:37:52 UTC
I vote for option 2. fix toasterconf.json so it is more sane and also remove/scrub the git assumptions.
Comment 3 Michael Wood 2016-09-15 14:31:08 UTC
We've now migrated to using loaddata which can load django fixtures instead of the homebrew toasterconf.json

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=33a4006529ca0e463f1e1fc95daef973a6facd3f