[yocto] [PATCH V4 06/10] update.py: update layers orderly

Robert Yang liezhi.yang at windriver.com
Thu Jun 22 20:02:00 PDT 2017



On 06/22/2017 07:33 PM, Paul Eggleton wrote:
> Hi Robert,
>
> On Thursday, 22 June 2017 1:04:23 PM CEST Robert Yang wrote:
>> On 06/21/2017 10:21 PM, Paul Eggleton wrote:
>>> On Tuesday, 13 June 2017 4:36:47 AM CEST Robert Yang wrote:
>>>> --- a/layerindex/update_layer.py
>>>> +++ b/layerindex/update_layer.py
>> ...
>>>> +def get_layer_var(config_data, var):
>>>> +    collection = config_data.getVar('BBFILE_COLLECTIONS', True)
>>>
>>> This makes the assumption that the layer.conf only adds one collection
>>> to BBFILE_COLLECTIONS. Probably a valid assumption 99.9% of the time these
>>> days, but it is worth noting.
>>
>> Should we check all BBFILE_COLLECTIONS, please ?
>
> I would say let's split the value and use the first one, but if there is more
> than one then warn e.g. "Multiple collections found, handling first one (%s)
> only" but otherwise continue processing. That way at least we'll know if this
> situation occurs.

Thanks, good idea, I will update it in V5.

// Robert

>
>>>> +def explode_dep_versions2(bitbakepath, deps):
>>>> +    bblib = bitbakepath + '/lib'
>>>> +    if not bblib in sys.path:
>>>> +        sys.path.insert(0, bblib)
>>>> +    import bb.utils
>>>> +    return bb.utils.explode_dep_versions2(deps)
>>>
>>> I'm not particularly happy with this (the wrapper nor calling bitbake code
>>
>> update.py needs explode_dep_versions2 to get dependencies and then calculate
>> them, I had tried to move the code into update_layer.py, and let
>> update_layer.py print explode_dep_versions2() to update.py, but it is a
>> OderedDic, and not easy to process it manually, so I leave the code in
>> update.py.
>
> Right, I understand the limitations and I don't really have a better
> alternative unfortunately, so we'll go with your current implementation. We
> may need to re-evaluate this in future at least structure-wise if we find the
> need to call other bitbake code in a similar way.
>
> Cheers,
> Paul
>
>



More information about the yocto mailing list