All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parse: get_file_depends(): return deterministic result
@ 2012-05-20 15:20 Enrico Scholz
  2012-05-23 10:27 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Scholz @ 2012-05-20 15:20 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Enrico Scholz

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@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
-- 
1.7.7.6




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] parse: get_file_depends(): return deterministic result
  2012-05-20 15:20 [PATCH] parse: get_file_depends(): return deterministic result Enrico Scholz
@ 2012-05-23 10:27 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-05-23 10:27 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: bitbake-devel

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@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-23 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-20 15:20 [PATCH] parse: get_file_depends(): return deterministic result Enrico Scholz
2012-05-23 10:27 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.