[OE-core] [PATCH 4/4] sstate: Avoid indirect bison/flex-native dependencies

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jan 11 17:01:35 UTC 2018


This avoids adding flex-native or bison-native to the sysroot without a specific
dependency in the recipe and means indirect dependencies (e.g. X -> Y -> binutils-cross -> flex-native)
no longer met the dependency incidentally. This improves determinism and avoid
build failures when people switch to external toolchains.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/sstate.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6808942..7509561 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -921,6 +921,13 @@ def setscene_depvalid(task, taskdependees, notneeded, d, log=None):
     if taskdependees[task][1] == "do_stash_locale" or taskdependees[task][1] == "do_gcc_stash_builddir":
         return True
 
+    # Don't pull in flex-native or bison-native without a specific dependency in the recipe
+    # This improves determinism in the metadata and avoids the dependency being met incidentally,
+    # e.g. from binutils-cross which doesn't happen in the external toolchain case
+    if taskdependees[task][1] == 'do_populate_sysroot':
+        if taskdependees[task][0] == "flex-native" or taskdependees[task][0] == "bison-native":
+            return True
+
     # We only need to trigger packagedata through direct dependencies
     # but need to preserve packagedata on packagedata links
     if taskdependees[task][1] == "do_packagedata":
-- 
2.7.4



More information about the Openembedded-core mailing list