Skip to contentSkip to conversation

distutils3.bbclass: improve error messages

PATCH In review Jens Rehsack 2 participants 2 messages Aug 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 distutils3.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.

---
 meta/classes/distutils3.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/distutils3.bbclass +2 -2
index 1d0c54a513..9e31505f0c 100644
@@ -23,14 +23,14 @@ distutils3_do_compile() {
         STAGING_LIBDIR=${STAGING_LIBDIR} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
         build ${DISTUTILS_BUILD_ARGS} || \
-        bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
+        bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
 }
 distutils3_do_compile[vardepsexclude] = "MACHINE"
 
 distutils3_stage_headers() {
         install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
-        bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
+        bbfatal_log "'${PYTHON_PN} setup.py install_headers' execution failed."
 }
 distutils3_stage_headers[vardepsexclude] = "MACHINE"
 
Signature · 1 line
2.17.1
#1 lore raw

1. There are other tasks have the similar bbfatal_log invoking, such as distutils3_stage_all/distutils3_do_install, why not update them all.

2. Would you please update python2's in distutils.bbclass also?

//Hongxu

Quoted 31 lines · Jens Rehsack

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.

---
  meta/classes/distutils3.bbclass | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/distutils3.bbclass +2 -2
index 1d0c54a513..9e31505f0c 100644
@@ -23,14 +23,14 @@ distutils3_do_compile() {
          STAGING_LIBDIR=${STAGING_LIBDIR} \
          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
          build ${DISTUTILS_BUILD_ARGS} || \
-        bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
+        bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
  }
  distutils3_do_compile[vardepsexclude] = "MACHINE"
 
  distutils3_stage_headers() {
          install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
-        bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
+        bbfatal_log "'${PYTHON_PN} setup.py install_headers' execution failed."
  }
  distutils3_stage_headers[vardepsexclude] = "MACHINE"