When a repo is listed in the autobuilder config file, it is automatically
included in the resulting bblayers.conf.  In most scenarios this is the
correct thing to do, however it results in a build error if a layer such
as meta-openembedded is one of the listed repos:

  IOError: [Errno 2] file [...]/build/meta-openembedded/conf/layer.conf not 
found

since meta-openembedded does not contain a top-level conf/ tree and is not
intended to be included as a meta-* layer itself.

Add an 'autoinclude' flag to the 'repo:' stanza of the config file with
the default being 'True' (ie. the current behaviour) but when set to
'False' the layer will still be checked out (making this behaviour
distinct from the 'checkout' flag) but not included in the bblayer.conf by
default, only layers specifically referenced in the CreateBBLayersConf
section of the 'steps:' stanza will be included.

Signed-off-by: Joe MacDonald <joe_macdon...@mentor.com>
---
 .../site-packages/autobuilder/buildsteps/CreateBBLayersConf.py         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/lib/python2.7/site-packages/autobuilder/buildsteps/CreateBBLayersConf.py 
b/lib/python2.7/site-packages/autobuilder/buildsteps/CreateBBLayersConf.py
index 03cb2a1..ace9fbb 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/CreateBBLayersConf.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/CreateBBLayersConf.py
@@ -95,7 +95,8 @@ class CreateBBLayersConf(ShellCommand):
                         elif layer.iterkeys().next()=="meta-qt4":
                             if layerversioncore is not None and 
int(layerversioncore) > 6:
                                 fout = fout + workdir + '/build/' + 
layer.iterkeys().next() + ' \ \n'
-                        else:
+                        elif 
(layer[layer.iterkeys().next()].has_key('autoinclude') and 
layer[layer.iterkeys().next()]['autoinclude'] is not False) or \
+                             
layer[layer.iterkeys().next()].has_key('autoinclude') is False:
                             fout = fout + workdir + '/build/' + 
layer.iterkeys().next() + ' \ \n'
                         ldirs.append(layer.iterkeys().next())
 
-- 
1.9.1

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to