summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-06 19:18:53 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-09 00:01:24 +0000
commit19ab90c30d98a5c185a2b037f6c2a5f57bfd6310 (patch)
treedd05eb2c7d98c5f091fa0c2f011590161e818a67
parenta7e117c8ed063eb11266de3f696d12a2b7b9708e (diff)
downloadpoky-19ab90c30d98a5c185a2b037f6c2a5f57bfd6310.tar.gz
python3-cython: Check for files before editing
If using debug-without-src policy then usr/src/debug won't exist, therefore the function will fail due to missing files, adding a check for files to exist before editing them fixes it. (From OE-Core rev: 0eb85a2670c9250350b66647f4cbdae446be830f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python3-cython_0.29.22.bb9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3-cython_0.29.22.bb b/meta/recipes-devtools/python/python3-cython_0.29.22.bb
index 01f716c16f..2ec4033fa0 100644
--- a/meta/recipes-devtools/python/python3-cython_0.29.22.bb
+++ b/meta/recipes-devtools/python/python3-cython_0.29.22.bb
@@ -20,8 +20,7 @@ do_install_append() {
20PACKAGEBUILDPKGD += "cython_fix_sources" 20PACKAGEBUILDPKGD += "cython_fix_sources"
21 21
22cython_fix_sources () { 22cython_fix_sources () {
23 sed -i -e 's#${WORKDIR}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' \ 23 for f in ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FlowControl.c \
24 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FlowControl.c \
25 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FusedNode.c \ 24 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/FusedNode.c \
26 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/Scanning.c \ 25 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/Scanning.c \
27 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/Visitor.c \ 26 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Compiler/Visitor.c \
@@ -29,5 +28,9 @@ cython_fix_sources () {
29 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Plex/Scanners.c \ 28 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Plex/Scanners.c \
30 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Runtime/refnanny.c \ 29 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Runtime/refnanny.c \
31 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Tempita/_tempita.c \ 30 ${PKGD}/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/Cython-${PV}/Cython/Tempita/_tempita.c \
32 ${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt 31 ${PKGD}${libdir}/${PYTHON_DIR}/site-packages/Cython*/SOURCES.txt; do
32 if [ -e $f ]; then
33 sed -i -e 's#${WORKDIR}#/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}#g' $f
34 fi
35 done
33} 36}