<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15129</bug_id>
          
          <creation_ts>2023-06-01 13:32:47 +0000</creation_ts>
          <short_desc>bitbake tracebacks for Python errors provide insufficient context</short_desc>
          <delta_ts>2026-08-20 15:11:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Trevor Gamblin">tgamblin</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95610</commentid>
    <comment_count>0</comment_count>
    <who name="Trevor Gamblin">tgamblin</who>
    <bug_when>2023-06-01 13:32:47 +0000</bug_when>
    <thetext>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(&quot;&apos;NoneType&apos; object has no attribute &apos;get&apos;&quot;)
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 [&apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-build_0.10.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-editables_0.3.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-installer_0.7.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-packaging_23.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-pathspec_0.11.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-pluggy_1.0.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3-trove-classifiers_2023.5.2.bb:do_populate_sysroot&apos;, &apos;virtual:native:/workspace/yocto/manual/openembedded-core/meta/recipes-devtools/python/python3_3.11.2.bb:do_populate_sysroot&apos;]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [&apos;python3-build-native&apos;, &apos;python3-editables-native&apos;, &apos;python3-installer-native&apos;, &apos;python3-packaging-native&apos;, &apos;python3-pathspec-native&apos;, &apos;python3-pluggy-native&apos;, &apos;python3-trove-classifiers-native&apos;, &apos;python3-native&apos;, &apos;python3-flit-core-native&apos;, &apos;python3-wheel-native&apos;, &apos;python3-setuptools-native&apos;, &apos;python3-calver-native&apos;, &apos;python3-importlib-metadata-native&apos;, &apos;python3-setuptools-scm-native&apos;, &apos;python3-more-itertools-native&apos;, &apos;python3-pyproject-hooks-native&apos;, &apos;libffi-native&apos;, &apos;zlib-native&apos;, &apos;bzip2-native&apos;, &apos;libedit-native&apos;, &apos;libnsl2-native&apos;, &apos;openssl-native&apos;, &apos;util-linux-libuuid-native&apos;, &apos;sqlite3-native&apos;, &apos;xz-native&apos;, &apos;libtirpc-native&apos;, &apos;libtool-native&apos;, &apos;gdbm-native&apos;, &apos;ncurses-native&apos;, &apos;expat-native&apos;, &apos;unzip-native&apos;, &apos;python3-zipp-native&apos;, &apos;python3-pathlib2-native&apos;, &apos;python3-toml-native&apos;, &apos;python3-typing-extensions-native&apos;, &apos;python3-tomli-native&apos;, &apos;python3-pip-native&apos;, &apos;python3-pyparsing-native&apos;, &apos;texinfo-dummy-native&apos;, &apos;gettext-minimal-native&apos;, &apos;perl-native&apos;, &apos;cmake-native&apos;, &apos;python3-six-native&apos;, &apos;make-native&apos;, &apos;zstd-native&apos;]
| 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 &apos;1&apos;
NOTE: Tasks Summary: Attempted 1124 tasks of which 1123 didn&apos;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 &quot;default&quot; version of such functions to be defined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97112</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:37:26 +0000</bug_when>
    <thetext>Build move to 5.0 -- ../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98828</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:13:53 +0000</bug_when>
    <thetext>Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98863</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:23:11 +0000</bug_when>
    <thetext>Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>