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.

(From OE-Core rev: 72938a8631cfe5be5ac88ad67f2db595e2487e86)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-10-06 08:37:40 +00:00
parent 28eedee1d4
commit 0c7b734f96
1 changed files with 11 additions and 0 deletions

View 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 \