summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Rehsack <sno@netbsd.org>2018-09-19 11:24:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-21 18:45:46 -0700
commitef753fc7b3a58596403417381abede5193ef2ddd (patch)
treeae0e0169fe6aa9799929a38c5989e9a9c0009b90
parent784a3f8198b47b02eaee8be99a31a8cae3c1a539 (diff)
downloadpoky-ef753fc7b3a58596403417381abede5193ef2ddd.tar.gz
distutils{, 3}.bbclass: improve error messages
For non-python developers it's difficult to identify where start searching in case of errors. Fixing and marking the string to grep for might help finding some root causes of issues slightly quicker. (From OE-Core rev: 44fff749ee7bfe47e88286aec1e8a22e63079ca7) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/distutils.bbclass8
-rw-r--r--meta/classes/distutils3.bbclass8
2 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index e7d48ab907..9862731493 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -21,13 +21,13 @@ distutils_do_compile() {
21 STAGING_INCDIR=${STAGING_INCDIR} \ 21 STAGING_INCDIR=${STAGING_INCDIR} \
22 STAGING_LIBDIR=${STAGING_LIBDIR} \ 22 STAGING_LIBDIR=${STAGING_LIBDIR} \
23 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ 23 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
24 bbfatal_log "${PYTHON_PN} setup.py build execution failed." 24 bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
25} 25}
26 26
27distutils_stage_headers() { 27distutils_stage_headers() {
28 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} 28 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
29 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ 29 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
30 bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed." 30 bbfatal_log "'${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS}' execution for stage_headers failed."
31} 31}
32 32
33distutils_stage_all() { 33distutils_stage_all() {
@@ -36,7 +36,7 @@ distutils_stage_all() {
36 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} 36 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
37 PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ 37 PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
38 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ 38 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
39 bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed." 39 bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS}' execution for stage_all failed."
40} 40}
41 41
42distutils_do_install() { 42distutils_do_install() {
@@ -45,7 +45,7 @@ distutils_do_install() {
45 STAGING_LIBDIR=${STAGING_LIBDIR} \ 45 STAGING_LIBDIR=${STAGING_LIBDIR} \
46 PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ 46 PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
47 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \ 47 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \
48 bbfatal_log "${PYTHON_PN} setup.py install execution failed." 48 bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed."
49 49
50 # support filenames with *spaces* 50 # support filenames with *spaces*
51 # only modify file if it contains path and recompile it 51 # only modify file if it contains path and recompile it
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index 1d0c54a513..834e322474 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -23,14 +23,14 @@ distutils3_do_compile() {
23 STAGING_LIBDIR=${STAGING_LIBDIR} \ 23 STAGING_LIBDIR=${STAGING_LIBDIR} \
24 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ 24 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
25 build ${DISTUTILS_BUILD_ARGS} || \ 25 build ${DISTUTILS_BUILD_ARGS} || \
26 bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed." 26 bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
27} 27}
28distutils3_do_compile[vardepsexclude] = "MACHINE" 28distutils3_do_compile[vardepsexclude] = "MACHINE"
29 29
30distutils3_stage_headers() { 30distutils3_stage_headers() {
31 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} 31 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
32 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ 32 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
33 bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed." 33 bbfatal_log "'${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS}' execution for stage_headers failed."
34} 34}
35distutils3_stage_headers[vardepsexclude] = "MACHINE" 35distutils3_stage_headers[vardepsexclude] = "MACHINE"
36 36
@@ -40,7 +40,7 @@ distutils3_stage_all() {
40 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} 40 install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
41 PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ 41 PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
42 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ 42 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
43 bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed." 43 bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS}' execution for stage_all failed."
44} 44}
45distutils3_stage_all[vardepsexclude] = "MACHINE" 45distutils3_stage_all[vardepsexclude] = "MACHINE"
46 46
@@ -50,7 +50,7 @@ distutils3_do_install() {
50 STAGING_LIBDIR=${STAGING_LIBDIR} \ 50 STAGING_LIBDIR=${STAGING_LIBDIR} \
51 PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ 51 PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
52 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \ 52 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \
53 bbfatal_log "${PYTHON_PN} setup.py install execution failed." 53 bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed."
54 54
55 # support filenames with *spaces* 55 # support filenames with *spaces*
56 find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; 56 find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \;