| Summary: |
bitbake tracebacks for Python errors provide insufficient context |
| Product: |
[Build System, Metadata & Runtime] BitBake
|
Reporter: |
Trevor Gamblin <tgamblin> |
| Component: |
bitbake | Assignee: |
Unassigned <unassigned> |
| Status: |
NEW
---
|
QA Contact: |
|
| Severity: |
enhancement
|
|
|
| Priority: |
Medium
|
CC: |
poky.bs.watcher, poky.watcher, randy.macleod
|
| Version: |
unspecified | |
|
| Target Milestone: |
6.99 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
When building and testing new recipes or changes to build processes for Python modules, error logs from bitbake can sometimes be cryptic and/or unhelpful. For example, a recent effort was made to change the python_hatchling class for cleaning up empty site-packages paths being left behind from previous builds, which had been breaking subsequent runs for recipes that relied on them (until TMPDIR was removed). This was done by adding a hatchling_rm_emptydirs() function, which had separate class-target and class-native versions (but no generic one without these specifiers). When testing with this change, I encountered the following error: NOTE: Executing Tasks ERROR: python3-hatchling-native-1.17.0-r0 do_prepare_recipe_sysroot: AttributeError("'NoneType' object has no attribute 'get'") ERROR: Logfile of failure stored in: /workspace/yocto/manual/openembedded-core/build/tmp-glibc/work/x86_64-linux/python3-hatchling-native/1.17.0-r0/temp/log.do_prepare_recipe_sysroot.3118241 Log data follows: | DEBUG: Executing python function do_prepare_recipe_sysroot | DEBUG: Executing python function extend_recipe_sysroot | NOTE: Direct dependencies are ['virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-build_0.10.0.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-editables_0.3.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-installer_0.7.0.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-packaging_23.1.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-pathspec_0.11.1.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-pluggy_1.0.0.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-trove-classifiers_2023.5.2.bb:do_populate_sysroot', 'virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3_3.11.2.bb:do_populate_sysroot'] | NOTE: Installed into sysroot: [] | NOTE: Skipping as already exists in sysroot: ['python3-build-native', 'python3-editables-native', 'python3-installer-native', 'python3-packaging-native', 'python3-pathspec-native', 'python3-pluggy-native', 'python3-trove-classifiers-native', 'python3-native', 'python3-flit-core-native', 'python3-wheel-native', 'python3-setuptools-native', 'python3-calver-native', 'python3-importlib-metadata-native', 'python3-setuptools-scm-native', 'python3-more-itertools-native', 'python3-pyproject-hooks-native', 'libffi-native', 'zlib-native', 'bzip2-native', 'libedit-native', 'libnsl2-native', 'openssl-native', 'util-linux-libuuid-native', 'sqlite3-native', 'xz-native', 'libtirpc-native', 'libtool-native', 'gdbm-native', 'ncurses-native', 'expat-native', 'unzip-native', 'python3-zipp-native', 'python3-pathlib2-native', 'python3-toml-native', 'python3-typing-extensions-native', 'python3-tomli-native', 'python3-pip-native', 'python3-pyparsing-native', 'texinfo-dummy-native', 'gettext-minimal-native', 'perl-native', 'cmake-native', 'python3-six-native', 'make-native', 'zstd-native'] | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Python function do_prepare_recipe_sysroot finished ERROR: Task (virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-hatchling_1.17.0.bb:do_prepare_recipe_sysroot) failed with exit code '1' NOTE: Tasks Summary: Attempted 1124 tasks of which 1123 didn't need to be rerun and 1 failed. It would be helpful to either make bitbake able to provide more context in these situations, and/or able to warn about needing a "default" version of such functions to be defined.