Skip to contentSkip to conversation

base.bbclass: fix nondeterministic PACKAGECONFIG processing order

PATCH In review Christopher Larson 3 participants 3 messages Oct 23, 2013 – Dec 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base.bbclass: fix nondeterministic PACKAGECONFIG processing order

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.

---
 meta/classes/base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/base.bbclass +1 -1
index dfa580c..93bc700 100644
@@ -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(",")
Signature · 1 line
1.8.3.4
#1 lore raw
Quoted 7 lines · Christopher Larson

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.

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

Quoted 18 lines
---
  meta/classes/base.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/base.bbclass +1 -1
index dfa580c..93bc700 100644
@@ -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(",")
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350
#2 lore raw
Quoted 13 lines · Randy MacLeod
Quoted 8 lines · Christopher Larson

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.

Robert,

Quoted 7 lines

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.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750