[bitbake-devel] [PATCH] parse: get_file_depends(): return deterministic result

Richard Purdie richard.purdie at linuxfoundation.org
Wed May 23 10:27:59 UTC 2012


On Sun, 2012-05-20 at 17:20 +0200, Enrico Scholz wrote:
> The output of get_file_depends() concatenates elements of a set.  Result
> of this operation is not deterministic because it is calculated by
> parallel running parsing threads.
> 
> Because result of get_file_depends() is stored into BBINCLUDED which
> goes in into various hash calculations, this can cause unwanted rebuilds
> of cache or recipes.
> 
> Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
> ---
>  lib/bb/parse/__init__.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
> index 7b9c47e..1e69778 100644
> --- a/lib/bb/parse/__init__.py
> +++ b/lib/bb/parse/__init__.py
> @@ -138,6 +138,6 @@ def get_file_depends(d):
>      depends = depends.union(d.getVar('__base_depends', True) or set())
>      for (fn, _) in depends:
>          dep_files.append(os.path.abspath(fn))
> -    return " ".join(dep_files)
> +    return " ".join(sorted(dep_files))
>  
>  from bb.parse.parse_py import __version__, ConfHandler, BBHandler

I've commented before on this list about the problems in this variable.
We need to fix this problem so the list is both correctly ordered and
that the order is maintained.

I'm therefore reluctant to take this patch and would like one that fixes
all the issues properly once and for all.

Cheers,

Richard






More information about the bitbake-devel mailing list