<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4146</bug_id>
          
          <creation_ts>2013-03-28 22:09:50 +0000</creation_ts>
          <short_desc>Allow a layer to include another layer</short_desc>
          <delta_ts>2015-10-01 15:03:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>configuration</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jason Wessel">jason.wessel</reporter>
          <assigned_to name="Jason Wessel">jason.wessel</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>hongxu.jia</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>Qi.Chen</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>31280</commentid>
    <comment_count>0</comment_count>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2013-03-28 22:09:50 +0000</bug_when>
    <thetext>There is no documented and defined way to dynamically add to BBLAYERS.

It would be ideal if a layer could add additional sub layers automatically.  When making large features it is nice to be able to just include a single layer which then includes additional layers automatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33260</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-05-24 08:46:39 +0000</bug_when>
    <thetext>Assuming this is a way of satisfying layer dependencies automatically, how would the system know where to find layers? If you mean by downloading them, how do we handle when the user already has the layer stored somewhere else locally?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40767</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-02-27 16:33:55 +0000</bug_when>
    <thetext>We still need more definition around this; setting to NEEDINFO accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42583</commentid>
    <comment_count>3</comment_count>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2014-04-10 21:33:46 +0000</bug_when>
    <thetext>Let us use an example, and I appologize this has to do more with a commercial product, but the idea is that I could put some kind of reference in the layer to automatically expand the bblayers list.

The example would be if I want to build a layer which has my own java application. It would be ideal if I could specify to automatically add meta-java, oe-core/meta, meta-networking, and meta-webserver.

The automated downloading of an entire layer with a fetch method is a bit of a separate problem. Perhaps it should have its own feature request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42599</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-04-11 09:16:54 +0000</bug_when>
    <thetext>I certainly understand the use case and the motivation; as above the part I&apos;m less clear on is how it would be implemented - how does it find layers? Would the system have a pre-defined map somewhere of available layers so that each layer would list its dependencies by name i.e. &quot;meta-java&quot; and then the system would de-reference that name to /home/paul/oe/layers/meta-java/ using the map? Or would it just be a nominated directory/path where layers should be found? Or, would it rely on an online service like the layer index? How do you deal with two versions of the same layer that you have fetched locally, which might have the same name (e.g. forks)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42614</commentid>
    <comment_count>5</comment_count>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2014-04-11 14:24:39 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; I certainly understand the use case and the motivation; as above the part
&gt; I&apos;m less clear on is how it would be implemented - how does it find layers?
&gt; Would the system have a pre-defined map somewhere of available layers so
&gt; that each layer would list its dependencies by name i.e. &quot;meta-java&quot; and
&gt; then the system would de-reference that name to
&gt; /home/paul/oe/layers/meta-java/ using the map? Or would it just be a
&gt; nominated directory/path where layers should be found? Or, would it rely on
&gt; an online service like the layer index? 


The way we typically use bitbake and oe today is to create a layers directory.  The layers directory is flat and looks like what you would find in layers.openembedded.org.  We could always elect to add a new type of file which is a layer.hints or layer.requires file, or perhaps add the needed data to layer.conf in the custom layer.



How do you deal with two versions of
&gt; the same layer that you have fetched locally, which might have the same name
&gt; (e.g. forks)?

My opinion is that the fetch model is the right one to go with since it also has the concept of premirrors.  This would allow you to use git, a tarball or a fully exploded layer (which you could just symlink).

In the commercial products based on oe, most use some kind of workspace setup script which will clone, link or copy all the pieces you need into the workspace and then populate the bblayers.  The idea here is to simplify that process, as well as to allow layer designers to have multiple layers even in the layers.openembedded.org.  Conceptually it is similar to using git modules where the master git tree tracks all the other submodules.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50068</commentid>
    <comment_count>6</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2015-04-03 03:30:39 +0000</bug_when>
    <thetext>Can `bitbake-layers layerindex-fetch meta-xxx&apos; satisfy the requirements of this feature?

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50100</commentid>
    <comment_count>7</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2015-04-07 02:40:31 +0000</bug_when>
    <thetext>Below is an example.

chenqi@pek-hostel-deb01:~/poky/build-sysvinit [0] $ bitbake-layers layerindex-fetch meta-networking
Layer                Required by          Git repository                                          Subdirectory
===================================================================================================================
meta-networking      -                    git://git.openembedded.org/meta-openembedded            meta-networking
openembedded-core    meta-networking      git://git.openembedded.org/openembedded-core            meta
meta-python          meta-networking      git://git.openembedded.org/meta-openembedded            meta-python
meta-oe              meta-python          git://git.openembedded.org/meta-openembedded            meta-oe
Adding layer &quot;meta-networking&quot; to conf/bblayers.conf
Adding layer &quot;meta-oe&quot; to conf/bblayers.conf
Adding layer &quot;meta-python&quot; to conf/bblayers.conf
chenqi@pek-hostel-deb01:~/poky/build-sysvinit [0] $ cat conf/bblayers.conf 
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = &quot;6&quot;

BBPATH = &quot;${TOPDIR}&quot;
BBFILES ?= &quot;&quot;

BBLAYERS ?= &quot; \
  /buildarea2/chenqi/poky/meta \
  /buildarea2/chenqi/poky/meta-yocto \
  /buildarea2/chenqi/poky/meta-yocto-bsp \
  /buildarea2/chenqi/poky/meta-openembedded/meta-networking \
  /buildarea2/chenqi/poky/meta-openembedded/meta-oe \
  /buildarea2/chenqi/poky/meta-openembedded/meta-python \
  &quot;
BBLAYERS_NON_REMOVABLE ?= &quot; \
  /buildarea2/chenqi/poky/meta \
  /buildarea2/chenqi/poky/meta-yocto \
  &quot;
chenqi@pek-hostel-deb01:~/poky/build-sysvinit [0] $</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52804</commentid>
    <comment_count>8</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2015-08-04 01:53:48 +0000</bug_when>
    <thetext>As I stated above, I believe the current utility could satisfy the original requirements.

Change the status to &quot;NEEDINFO&quot; to get more feed back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54886</commentid>
    <comment_count>9</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-10-01 15:03:59 +0000</bug_when>
    <thetext>This has been sitting around for some time without much comment; we&apos;ve implemented the capability to bring in layers from the OE layer index (or an internal layer index); if we need to extend that or do something different, let&apos;s open a bug with a specific request for the desired functionality.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>