Patchwork base.bbclass: fix nondeterministic PACKAGECONFIG processing order

login
register
mail settings
Submitter Christopher Larson
Date Oct. 23, 2013, 8:47 p.m.
Message ID <1382561247-30349-1-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/60421/
State Accepted
Commit 843a5dd8f8f0461e286d9fdb3ba55205b4275f88
Headers show

Comments

Christopher Larson - Oct. 23, 2013, 8:47 p.m.
The PACKAGECONFIG flags were iterated over using dict.items(), but this
returns the items in an undefined order. As this order determines the
EXTRA_OECONF append order, we can get EXTRA_OECONF which are functionally
equivalent, but whose contents differ, resulting in not using shared state
archives we should be using.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
---
 meta/classes/base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Randy MacLeod - Dec. 2, 2013, 9:18 p.m.
On 13-10-23 04:47 PM, Christopher Larson wrote:
> The PACKAGECONFIG flags were iterated over using dict.items(), but this
> returns the items in an undefined order. As this order determines the
> EXTRA_OECONF append order, we can get EXTRA_OECONF which are functionally
> equivalent, but whose contents differ, resulting in not using shared state
> archives we should be using.
>
> Signed-off-by: Christopher Larson <kergoth@gmail.com>

Robert,

Can this commit be pulled into dora?
More deterministic behaviour is more supportable behaviour!

It's:
    843a5dd
    base.bbclass: fix nondeterministic PACKAGECONFIG processing order
on master.

../Randy

> ---
>   meta/classes/base.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index dfa580c..93bc700 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -433,7 +433,7 @@ python () {
>           extradeps = []
>           extrardeps = []
>           extraconf = []
> -        for flag, flagval in pkgconfigflags.items():
> +        for flag, flagval in sorted(pkgconfigflags.items()):
>               if flag == "defaultval":
>                   continue
>               items = flagval.split(",")
>
Otavio Salvador - Dec. 2, 2013, 10:08 p.m.
On Mon, Dec 2, 2013 at 7:18 PM, Randy MacLeod
<randy.macleod@windriver.com> wrote:
> On 13-10-23 04:47 PM, Christopher Larson wrote:
>>
>> The PACKAGECONFIG flags were iterated over using dict.items(), but this
>> returns the items in an undefined order. As this order determines the
>> EXTRA_OECONF append order, we can get EXTRA_OECONF which are functionally
>> equivalent, but whose contents differ, resulting in not using shared state
>> archives we should be using.
>>
>> Signed-off-by: Christopher Larson <kergoth@gmail.com>
>
>
> Robert,
>
> Can this commit be pulled into dora?
> More deterministic behaviour is more supportable behaviour!
>
> It's:
>    843a5dd
>    base.bbclass: fix nondeterministic PACKAGECONFIG processing order
> on master.

I agree; this is a very good bugfix  and improve sstate-cache reuse.

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index dfa580c..93bc700 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -433,7 +433,7 @@  python () {
         extradeps = []
         extrardeps = []
         extraconf = []
-        for flag, flagval in pkgconfigflags.items():
+        for flag, flagval in sorted(pkgconfigflags.items()):
             if flag == "defaultval":
                 continue
             items = flagval.split(",")