[oe-commits] Richard Purdie : python: Ensure build completes before install

git at git.openembedded.org git at git.openembedded.org
Sun Oct 6 08:37:20 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 72938a8631cfe5be5ac88ad67f2db595e2487e86
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=72938a8631cfe5be5ac88ad67f2db595e2487e86

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Sun Oct  6 08:37:40 2013 +0000

python: Ensure build completes before install

At the start of install, python swizzles the makefiles around, leading
to chunks of do_compile running again. These race against the install
target, leading to errors if pieces are being recompiled whilst others
are being installed.

For now, workaround this by running the compile target with the new
makefile, then running install ensuring a parallel make race doesn't
happen.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/python/python_2.7.3.bb |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index f6a4609..40d20f1 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -100,6 +100,17 @@ do_install() {
 
 	export CROSS_COMPILE="${TARGET_PREFIX}"
 	export PYTHONBUILDDIR="${S}"
+
+	# After swizzling the makefile, we need to run the build again.
+	# install can race with the build so we have to run this first, then install
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		DESTDIR=${D} LIBDIR=${libdir}
 	
 	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
 		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \



More information about the Openembedded-commits mailing list