]> code.ossystems Code Review - openembedded-core.git/commitdiff
python: Ensure build completes before install
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 6 Oct 2013 08:37:40 +0000 (08:37 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 6 Oct 2013 08:44:37 +0000 (09:44 +0100)
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@linuxfoundation.org>
meta/recipes-devtools/python/python_2.7.3.bb

index f6a460989b8549ddbbf4d2351f1894c724504739..40d20f1f4fdfe1f8731f2368df96da94c47ef876 100644 (file)
@@ -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 \