[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-architecture
Subject:    Re: [Openembedded-architecture] OEDEM - Setup program
From:       Mark Hatle <mark.hatle () windriver ! com>
Date:       2016-11-22 16:20:58
Message-ID: 4941cd36-75b7-8c68-7af8-34b634522a66 () windriver ! com
[Download RAW message or body]

On 11/22/16 9:53 AM, Mark Hatle wrote:
> On 11/21/16 11:33 PM, Trevor Woerner wrote:
>> On Wed 2016-11-16 @ 05:12:24 PM, Mark Hatle wrote:
>>> In
>>> addition, the current layer index does not yet have distro indexing.  This is
>>> available in the paule/django18 branch, but has not yet gone into the production
>>> version.  When the setup program uses an index without any distribution
>>> information, it simply adds a single 'nodistro' entry for OpenEmbedded.
>>
>> I was under the impression that it does:
>>
>> 	$ wget http://layers.openembedded.org/layerindex/api/layerItems/ -O layerItems.json
> 
> There is a python module that I wrote:
> 
> https://github.com/Wind-River/wr-lx-setup/blob/master/bin/layer_index.py
> 
> This class handles the loading of the json information from the rest api..
> 
> The function, load_API_Index(self, url, name=None, branches=None), handles the
> loading of the rest API.
> 
> The general processing happens with:
> 
> pull the http://layers.openembedded.org/layerindex/api, this gives us the urls
> that we can query for other components.
> 
> We then pull down branches, and filter on a specific branch 'name'.
> 
> We then pull down layerBranches, again filtering on a specific 'branch__name'.
> 
> ...then layerItems, by 'layerbranch__branch__name'...
> 
> ..then layerdependencies...machines...recipes...
> 
> We then check if 'distro' is a valid field in the original set of rest APIs we
> have.  If it is available, we load it from the restapi.  But since the layer
> index does not yet have the distro field, we fall back to a single hard coded
> entry that adds 'nodistro', and attaches it to the layerBranch and thus
> layerItems for 'openembedded-core'.  (If there is more then one
> openembedded-core, we attach it to each of them.)
> 
> (This is around like 260-267.)
> 
> This is also where you would need to hard code specific entries before the
> public layer index is moved to the newer version of the code.  (Format is pretty
> simple.. especially when you understand how things are associated, see below.)
> 
>> Then search "layerItems.json" for records where "layer_type":"D"
>>
>> 	# choose a distro layer
>> 	choices = []
>> 	distroLines = sorted(layerItems, key=lambda k: k["name"])
>> 	distroLines = filter(lambda x: x["layer_type"] == "D", distroLines)
>> 	choices.append(("nodistro", "The distro-less distro"))
>>

I just realized the chunk above is specific for finding a -layer- with the type
distribution, but it doesn't actually carry any useful information other then
the layer type is distribution.

There are a small number of defined layer types:

Base
Machine (BSP)
Software
Distribution
Miscellaneous

The Base is for base software, like oe-core.  The machine (BSP) is for BSP
layers, the software (likely everything else?), Distribution for layers that
provide distributions.. and Misc?

But each of these is up to the layer submitter to simply explain the purpose of
their layer, but otherwise it doesn't mean anything.  The internal, machine,
recipes, distro, etc are the pieces that actually have meaning to the setup program.

> 
> layerItems is only the actual layer itself.
> 
> If you go to:
> 
> https://layers.openembedded.org/layerindex/api/
> 
> You will see:
> 
> branches -- This is the branch identifier.  It simply captures known branch
> names and the associated bitbake branch name.
> 
> layerItems -- this is the generic, cross branch information for each layer.  It
> contains name, type, summary, description, urls, and a few other things.
> 
> layerBranches -- this is the link between the layerItems and the branches.  It
> also contains an optional field "actual_branch", if a layer's branch doesn't
> match the generic name specified in branches.  Everything else in the system is
> associated with a layerBranch entry.
> 
> layerDependencies -- this simply captures the layer dependency information.  It
> ties a layerBranch to a specific layerItem 'dependency'.  The newer version of
> the layer index now has a 'required' field as well, so some dependencies can be
> listed as optional.  (Note the dependency is on layerItems, not layerBranches.)
> 
> recipes -- this lists each recipe in a given layerBranch.
> 
> machines -- this lists each machine in a given layerBranch.
> 
> distro -- (new) this lists each distro in a given layerBranch.
> 
> 
> both the recommended dependencies and the distro fields don't yet exist in
> layers.openembedded.org.
> 
> _______________________________________________
> Openembedded-architecture mailing list
> Openembedded-architecture@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-architecture
> 

_______________________________________________
Openembedded-architecture mailing list
Openembedded-architecture@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-architecture
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic