Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] sstate: Avoid indirect bison-native dependencies (via SSTATE_EXCLUDEDEPS_SYSROOT)
@ 2018-08-15 14:33 Richard Purdie
  2018-08-15 14:33 ` [PATCH 2/2] sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling Richard Purdie
  2018-08-15 15:02 ` ✗ patchtest: failure for "sstate: Avoid indirect bison-n..." and 1 more Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2018-08-15 14:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: André Draszik

From: André Draszik <andre.draszik@jci.com>

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

Based on an idea by Richard Purdie:
    http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/layer.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 0a8f8ed9eb5..cc77d078a80 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -78,6 +78,12 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   weston-init->kbd \
 "
 
+# Avoid adding bison-native to the sysroot without a specific
+# dependency in the recipe. This means indirect dependencies
+# (e.g. X -> Y -> binutils-cross -> bison-native) no longer meet the
+# dependency incidentally. This improves determinism and avoids build
+# failures when people switch to external toolchains.
+SSTATE_EXCLUDEDEPS_SYSROOT += ".*->bison-native"
 # Nothing needs to depend on libc-initial/gcc-cross-initial
 # base-passwd/shadow-sysroot don't need their dependencies
 SSTATE_EXCLUDEDEPS_SYSROOT += "\
-- 
2.17.1



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

* [PATCH 2/2] sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling
  2018-08-15 14:33 [PATCH 1/2] sstate: Avoid indirect bison-native dependencies (via SSTATE_EXCLUDEDEPS_SYSROOT) Richard Purdie
@ 2018-08-15 14:33 ` Richard Purdie
  2018-08-15 15:02 ` ✗ patchtest: failure for "sstate: Avoid indirect bison-n..." and 1 more Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2018-08-15 14:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: André Draszik

Using re.compile() is around six times faster than recompiling the regexp
each time so maintain a cache.

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

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6f2fa583f29..c0e54a398d6 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -980,9 +980,16 @@ def setscene_depvalid(task, taskdependees, notneeded, d, log=None):
             # them in.
             # See also http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html
             not_needed = False
-            for excl in (d.getVar('SSTATE_EXCLUDEDEPS_SYSROOT') or "").split():
-                if re.match(excl.split('->', 1)[0], taskdependees[dep][0]):
-                    if re.match(excl.split('->', 1)[1], taskdependees[task][0]):
+            excludedeps = d.getVar('_SSTATE_EXCLUDEDEPS_SYSROOT')
+            if excludedeps is None:
+                # Cache the regular expressions for speed
+                excludedeps = []
+                for excl in (d.getVar('SSTATE_EXCLUDEDEPS_SYSROOT') or "").split():
+                    excludedeps.append((re.compile(excl.split('->', 1)[0]), re.compile(excl.split('->', 1)[1])))
+                d.setVar('_SSTATE_EXCLUDEDEPS_SYSROOT', excludedeps)
+            for excl in excludedeps:
+                if excl[0].match(taskdependees[dep][0]):
+                    if excl[1].match(taskdependees[task][0]):
                         not_needed = True
                         break
             if not_needed:
-- 
2.17.1



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

* ✗ patchtest: failure for "sstate: Avoid indirect bison-n..." and 1 more
  2018-08-15 14:33 [PATCH 1/2] sstate: Avoid indirect bison-native dependencies (via SSTATE_EXCLUDEDEPS_SYSROOT) Richard Purdie
  2018-08-15 14:33 ` [PATCH 2/2] sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling Richard Purdie
@ 2018-08-15 15:02 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-08-15 15:02 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

== Series Details ==

Series: "sstate: Avoid indirect bison-n..." and 1 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/13533/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 48775d2f02)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

end of thread, other threads:[~2018-08-15 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-15 14:33 [PATCH 1/2] sstate: Avoid indirect bison-native dependencies (via SSTATE_EXCLUDEDEPS_SYSROOT) Richard Purdie
2018-08-15 14:33 ` [PATCH 2/2] sstate: Optimise SSTATE_EXCLUDEDEPS_SYSROOT handling Richard Purdie
2018-08-15 15:02 ` ✗ patchtest: failure for "sstate: Avoid indirect bison-n..." and 1 more Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox