[bitbake-devel] [PATCH 0/5] Add a standard module for accessing the layerindex

Mark Hatle mark.hatle at windriver.com
Thu Jul 12 21:07:06 UTC 2018


On 7/12/18 3:34 PM, Mark Hatle wrote:
> In order to simply existing components, and add support to create some
> new functionaly -- we need a common apporach for access the layerindex.
> 
> The class supports loading multilib layerindexes, but right now that
> functionality is not being used by either bitbake-layers or the toaster.
> 
> There are a few 'TODO' items that remain in the code.  These are related
> to either un-implemented, but planned functionality or to display stuff
> in bitbake-layers.  I'm hoping that part of this review can discuss the
> TODO items.

FYI 2/5 is a bit large, and is held up in list moderation.  I've posted all of
the patches to:

http://git.openembedded.org/bitbake-contrib/log/?h=mgh/bitbake-layerindex


The bitbake-layers layerindex-fetch display has changed.  For the example of:

$ bitbake-layers layerindex-fetch meta-python

Originally it would have produced:

Layer                Required by          Git repository
                 Subdirectory
===================================================================================================================
meta-python          -
git://git.openembedded.org/meta-openembedded            meta-python
meta-oe              meta-python
git://git.openembedded.org/meta-openembedded            meta-oe
openembedded-core    meta-python
git://git.openembedded.org/openembedded-core            meta
Adding layer "meta-python" (.../oe-core/meta-openembedded/meta-python) to
conf/bblayers.conf
Adding layer "meta-oe" (.../oe-core/meta-openembedded/meta-oe) to conf/bblayers.conf

With the new code, the output now looks like:

Layer                                              Git repository (branch)
                          Subdirectory
=============================================================================================================================
local:sumo:openembedded-core
git://github.com/openembedded/openembedded-core (master) meta
  required by: meta-python meta-oe
layers.openembedded.org:sumo:meta-oe
git://git.openembedded.org/meta-openembedded (sumo)     meta-oe
  required by: meta-python
layers.openembedded.org:sumo:meta-python
git://git.openembedded.org/meta-openembedded (sumo)     meta-python
Adding layer "meta-oe"
(/home/mhatle/git/oss/openembedded-core/meta-openembedded/meta-oe) to
conf/bblayers.conf
Adding layer "meta-python"
(/home/mhatle/git/oss/openembedded-core/meta-openembedded/meta-python) to
conf/bblayers.conf

You will see that the order changed... the requested layer(s) will not be last
instead of first.  And the requirements have been moved to the following line.
This was made to accommodate the 'layer' information changing.  The format there
is the '<index>:<index branch>:<layer>'

But as you can see the behavior is functionally equivalent, even though the
order has changed.

--Mark

> 
> Mark Hatle (5):
>   bblayers/layerindex.py: Fix addition of layers
>   layerindexlib: Initial layer index processing module implementation
>   bblayers/layerindex.py: Switch to use the new layerindexlib class
>   bitbake-layers: disable parsing for layerindex commands
>   toaster/orm/management/commands/lsupdates.py: Use new layerindexlib
>     module
> 
>  bin/bitbake-selftest                               |   6 +-
>  lib/bblayers/layerindex.py                         | 302 +++----
>  lib/layerindexlib/README                           |  28 +
>  lib/layerindexlib/__init__.py                      | 974 +++++++++++++++++++++
>  lib/layerindexlib/common.py                        | 161 ++++
>  lib/layerindexlib/cooker.py                        | 338 +++++++
>  lib/layerindexlib/restapi.py                       | 375 ++++++++
>  lib/layerindexlib/tests/__init__.py                |   0
>  lib/layerindexlib/tests/common.py                  |  37 +
>  lib/layerindexlib/tests/cooker.py                  | 125 +++
>  lib/layerindexlib/tests/layerindex.py              | 233 +++++
>  lib/layerindexlib/tests/restapi.py                 | 170 ++++
>  lib/layerindexlib/tests/testdata/README            |  11 +
>  .../tests/testdata/build/conf/bblayers.conf        |  15 +
>  .../tests/testdata/layer1/conf/layer.conf          |  17 +
>  .../tests/testdata/layer2/conf/layer.conf          |  20 +
>  .../tests/testdata/layer3/conf/layer.conf          |  19 +
>  .../tests/testdata/layer4/conf/layer.conf          |  22 +
>  lib/toaster/orm/management/commands/lsupdates.py   | 215 ++---
>  19 files changed, 2751 insertions(+), 317 deletions(-)
>  create mode 100644 lib/layerindexlib/README
>  create mode 100644 lib/layerindexlib/__init__.py
>  create mode 100644 lib/layerindexlib/common.py
>  create mode 100644 lib/layerindexlib/cooker.py
>  create mode 100644 lib/layerindexlib/restapi.py
>  create mode 100644 lib/layerindexlib/tests/__init__.py
>  create mode 100644 lib/layerindexlib/tests/common.py
>  create mode 100644 lib/layerindexlib/tests/cooker.py
>  create mode 100644 lib/layerindexlib/tests/layerindex.py
>  create mode 100644 lib/layerindexlib/tests/restapi.py
>  create mode 100644 lib/layerindexlib/tests/testdata/README
>  create mode 100644 lib/layerindexlib/tests/testdata/build/conf/bblayers.conf
>  create mode 100644 lib/layerindexlib/tests/testdata/layer1/conf/layer.conf
>  create mode 100644 lib/layerindexlib/tests/testdata/layer2/conf/layer.conf
>  create mode 100644 lib/layerindexlib/tests/testdata/layer3/conf/layer.conf
>  create mode 100644 lib/layerindexlib/tests/testdata/layer4/conf/layer.conf
> 




More information about the bitbake-devel mailing list