Openembedded Core Discussions
 help / color / mirror / Atom feed
* [dylan, master][PATCH] autotools.bbclass: Fix race with sed-native
@ 2013-10-04 23:35 Richard Tollerton
  2013-10-05  3:22 ` Saul Wold
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Tollerton @ 2013-10-04 23:35 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton, gratian.crisan, ken.sharp

Suppose the following:
1) foo.do_configure/do_build runs in parallel with
   sed-native.do_configure;
2) foo.do_configure/do_build makes use of sed (i.e. inherits autotools);
3) A previously built sed-native already exists in the native sysroot,
   and in the sstate cache.

Then sed-native may be deleted from its sysroot via
sstate_clean_manifest while foo.do_configure/do_build is using it,
leading to an irreproducible build failure.

This fix does for sed-native what's already done for libtool-native,
with some additional light refactoring.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
---
 meta/classes/autotools.bbclass | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 66c0f5d..2bb2aa3 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -7,17 +7,25 @@ def autotools_dep_prepend(d):
 
     if pn in ['autoconf-native', 'automake-native', 'help2man-native']:
         return deps
-    deps += 'autoconf-native automake-native '
+    deps += 'autoconf-native automake-native gnu-config-native '
 
-    if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"):
-        deps += 'libtool-native '
-        if not bb.data.inherits_class('native', d) \
-                        and not bb.data.inherits_class('nativesdk', d) \
-                        and not bb.data.inherits_class('cross', d) \
-                        and not d.getVar('INHIBIT_DEFAULT_DEPS', True):
-            deps += 'libtool-cross '
+    if pn in ['libtool', 'libtool-native'] or pn.endswith("libtool-cross"):
+        return deps
+    deps += 'libtool-native '
+
+    if d.getVar('INHIBIT_DEFAULT_DEPS', True):
+        return deps
+
+    if pn not in ['sed-native']:
+        deps += 'sed-native '
+
+    if bb.data.inherits_class('native', d) \
+       or bb.data.inherits_class('nativesdk', d) \
+       or bb.data.inherits_class('cross', d):
+        return deps
+    deps += 'libtool-cross '
 
-    return deps + 'gnu-config-native '
+    return deps
 
 EXTRA_OEMAKE = ""
 
-- 
1.8.4



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

end of thread, other threads:[~2013-10-10 10:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-04 23:35 [dylan, master][PATCH] autotools.bbclass: Fix race with sed-native Richard Tollerton
2013-10-05  3:22 ` Saul Wold
2013-10-05  7:37   ` Richard Purdie
2013-10-08  2:44     ` Richard Tollerton
2013-10-08 12:19       ` Richard Purdie
2013-10-08 13:03         ` Enrico Scholz
2013-10-08 17:47         ` Richard Tollerton
2013-10-10  9:00           ` Richard Purdie
2013-10-10 10:29             ` Phil Blundell
2013-10-08  2:55   ` Richard Tollerton

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