[yocto] [layerindex-web][PATCH 5/7] update: ignore recommends when ordering layers

Robert Yang liezhi.yang at windriver.com
Mon Jul 2 19:45:11 PDT 2018


Hi Paul,

Thanks for let me know this, this patch might be incorrect, suppose we have two
layers: core and hello:

1) LAYERRECOMMENDS_core = "hello"
2) $ update.py -l hello,core

Then core maybe added before hello layer since it ignores recs on hello, and if
hello is a new layer, it would not be in core's recs in database since core
knows nothing about hello, I think that this is incorrect.

If we really need this, I think that we should not ignore recs when the
layer is present, but only ignore it when the layer is not present, for
example, ignore it when hello layer doesn't exist, otherwise, don't ignore it.

But I'm not sure about patch 4 (error -> warning) either, since layerindex is
a central database, whether add recs to conf/bblayers.conf should depend on
end user rather than ignore it in database, otherwise the end user (especially
the api user) would have no way to choice, for example, we use api to make
conf/bblayers.conf have all or no recs layers according to user's choice,
if the database is wrong, then there might be only part of recs layers.
Though we can check update.py's warnings to fix the problem.

// Robert

On 07/03/2018 06:58 AM, Paul Eggleton wrote:
> We don't actually need to consider recommended layers when preparing the
> order - just the depends. If we do then we can get into circular
> dependency situation e.g. currently with meta-intel and meta-intel-qat
> where meta-intel recommends meta-intel-qat and meta-intel-qat depends on
> meta-intel. (Likely the latter dependency is erroneous since the content
> of meta-intel-qat doesn't appear to depend on meta-intel, but there
> could be other scenarios where it is legitimate).
> 
> Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
> ---
>   layerindex/update.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/layerindex/update.py b/layerindex/update.py
> index 06c61a79..a4b96e24 100755
> --- a/layerindex/update.py
> +++ b/layerindex/update.py
> @@ -399,7 +399,7 @@ def main():
>                       deps = re.search("^LAYERDEPENDS = \"(.*)\"", output, re.M).group(1) or ''
>                       recs = re.search("^LAYERRECOMMENDS = \"(.*)\"", output, re.M).group(1) or ''
>   
> -                    deps_dict = utils.explode_dep_versions2(bitbakepath, deps + ' ' + recs)
> +                    deps_dict = utils.explode_dep_versions2(bitbakepath, deps)
>                       if len(deps_dict) == 0:
>                           # No depends, add it firstly
>                           layerquery_sorted.append(layer)
> 


More information about the yocto mailing list