[OE-core] [dylan, master][PATCH] autotools.bbclass: Fix race with sed-native
Richard Tollerton
rich.tollerton at ni.com
Fri Oct 4 23:35:53 UTC 2013
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 at 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
More information about the Openembedded-core
mailing list