<?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>15611</bug_id>
          
          <creation_ts>2024-10-05 09:45:48 +0000</creation_ts>
          <short_desc>buildhistory package generation fails for empty package</short_desc>
          <delta_ts>2024-10-23 19:41:01 +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>OE-Core</product>
          <component>oe-core other</component>
          <version>5.0.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.0.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Cord-Landwehr">cordlandwehr</reporter>
          <assigned_to name="Steve Sakoman">steve</assigned_to>
          <cc>tim.orling</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>99778</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Cord-Landwehr">cordlandwehr</who>
    <bug_when>2024-10-05 09:45:48 +0000</bug_when>
    <thetext>Please note that this is a problem I see on scarthgap branch *after* yocto-5.0.3 tag, but I am not sure where to report this otherwise, since the problem solution is not fully obvious to me: When using &quot;buildhistory&quot; in my global INHERIT statement, the packages history generation for libdevmapper fails because libdevmapper does not provide any package.

The trivial workaround is to use:

diff --cc meta/classes/buildhistory.bbclass
index 0b1bd518fe,0b1bd518fe..ca0cab3689
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@@ -621,7 -621,7 +621,7 @@@ buildhistory_list_pkg_files() 
        fi
  
        # Create individual files-in-package for each recipe&apos;s package
--      pkgdirlist=$(find ${PKGDEST}/* -maxdepth 0 -type d)
++      pkgdirlist=$(find ${PKGDEST}/* -maxdepth 0 -type d 2&gt;/dev/null || true)
        for pkgdir in $pkgdirlist; do
                pkgname=$(basename $pkgdir)
                outfolder=&quot;${BUILDHISTORY_DIR_PACKAGE}/$pkgname&quot;

which is probably not a good idea to mask all errors ;)

My layer hashes and bitbake output are:

yoctouser@355b0133b0d8:/opt/yocto/kde/scarthgap/build-raspberrypi5$ bitbake libdevmapper
Loading cache: 100% |###############################################################################################################################################################################| Time: 0:00:03
Loaded 5340 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = &quot;2.8.0&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;universal&quot;
TARGET_SYS           = &quot;aarch64-poky-linux&quot;
MACHINE              = &quot;raspberrypi5&quot;
DISTRO               = &quot;kde-linux&quot;
DISTRO_VERSION       = &quot;5.0.4&quot;
TUNE_FEATURES        = &quot;aarch64 crypto cortexa76&quot;
TARGET_FPU           = &quot;&quot;
meta-kde-demo        = &quot;work/scarthgap:ec99897e969dffb5398fd13583c4eeae72616652&quot;
meta-kf6             = &quot;work/kdoctools-fix-temp-dir-access:a2576a03d6759394bb583ab5f114c20e8fed0053&quot;
meta-kde             = &quot;master:8db4e65e5cb6e1b2cf011626f9ab94231cd0e249&quot;
meta-qt6             = &quot;6.8.0:dc13e1bfda4a4757a08c2d6673bc4bac012c4a80&quot;
meta-java            = &quot;HEAD:a2c62218c1dbc4cb49461afa8c1a88f89cf9457f&quot;
meta-networking      
meta-python          
meta-oe              
meta-multimedia      = &quot;HEAD:735ae0310870ffce07ce0c55c4f87c20ac161ff9&quot;
meta-yocto-bsp       
meta-poky            
meta                 = &quot;HEAD:c799f73a47fa35d6059456291328f7ff10fdb273&quot;
meta-raspberrypi     = &quot;HEAD:1879cb831f4ea3e532cb5ce9fa0f32be917e8fa3&quot;
u-boot               = &quot;scarthgap/u-boot:66ceeebd047d7fdfc8668b300319a76da8ae257d&quot;

Sstate summary: Wanted 13 Local 0 Mirrors 0 Missed 13 Current 274 (0% match, 95% complete)########################################################################################                  | ETA:  0:00:00
Initialising tasks: 100% |##########################################################################################################################################################################| Time: 0:00:01
NOTE: Executing Tasks
ERROR: libdevmapper-2.03.22-r0 do_package: ExecutionError(&apos;/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/temp/run.buildhistory_list_pkg_files.3020896&apos;, 1, None, None)
ERROR: Logfile of failure stored in: /opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/temp/log.do_package.3020896
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [&apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-core/glibc/glibc_2.39.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-core/systemd/systemd-systemctl-native.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/gcc/gcc-cross_13.3.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_13.3.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/libtool/libtool-cross_2.4.7.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/libtool/libtool-native_2.4.7.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot&apos;, &apos;/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-extended/libaio/libaio_0.3.113.bb:do_populate_sysroot&apos;, &apos;virtual:native:/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2023.02.20.bb:do_populate_sysroot&apos;, &apos;virtual:native:/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.72e.bb:do_populate_sysroot&apos;, &apos;virtual:native:/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/automake/automake_1.16.5.bb:do_populate_sysroot&apos;, &apos;virtual:native:/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot&apos;, &apos;virtual:native:/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot&apos;, &apos;virtual:native:/opt/yocto/kde/scarthgap/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot&apos;]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [&apos;gettext-minimal-native&apos;, &apos;glibc&apos;, &apos;systemd-systemctl-native&apos;, &apos;binutils-cross-aarch64&apos;, &apos;gcc-cross-aarch64&apos;, &apos;gcc-runtime&apos;, &apos;libgcc&apos;, &apos;libtool-cross&apos;, &apos;libtool-native&apos;, &apos;m4-native&apos;, &apos;quilt-native&apos;, &apos;libaio&apos;, &apos;texinfo-dummy-native&apos;, &apos;linux-libc-headers&apos;, &apos;zlib-native&apos;, &apos;autoconf-archive-native&apos;, &apos;autoconf-native&apos;, &apos;automake-native&apos;, &apos;flex-native&apos;, &apos;gnu-config-native&apos;, &apos;patch-native&apos;, &apos;pkgconfig-native&apos;, &apos;pseudo-native&apos;, &apos;xz-native&apos;, &apos;zstd-native&apos;, &apos;attr-native&apos;, &apos;gmp-native&apos;, &apos;libmpc-native&apos;, &apos;mpfr-native&apos;, &apos;sqlite3-native&apos;]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing python function do_package
| DEBUG: No packages to build, skipping do_package
| DEBUG: Python function do_package finished
| DEBUG: Executing python function sstate_task_postfunc
| NOTE: Using umask 0o002 (not 22) for sstate packaging
| DEBUG: Executing python function target_add_sysroot_deps
| DEBUG: Python function target_add_sysroot_deps finished
| DEBUG: Executing python function sstate_hardcode_path
| NOTE: Removing hardcoded paths from sstate package: &apos;find /opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/sstate-build-package/ \( -name &quot;*.la&quot; -o -name &quot;*-config&quot; -o -name &quot;*_config&quot; -o -name &quot;postinst-*&quot; \) -type f | xargs grep -l -e &apos;/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/recipe-sysroot&apos; -e &apos;/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/recipe-sysroot-native&apos; -e &apos;/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/hosttools&apos; | tee /opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/sstate-build-package/fixmepath | xargs --no-run-if-empty sed -i -e &apos;s:/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/recipe-sysroot-native:FIXMESTAGINGDIRHOST:g&apos; -e &apos;s:/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/recipe-sysroot:FIXMESTAGINGDIRTARGET:g&apos; -e &apos;s:/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/hosttools:FIXME_HOSTTOOLS_DIR:g&apos;&apos;
| DEBUG: Python function sstate_hardcode_path finished
| DEBUG: Executing python function sstate_report_unihash
| DEBUG: Reported task 1cb9183c1f63473a608bf8e33d6a7f61d6c06509de13d554c5748f3ab89eb1c1 as unihash 1cb9183c1f63473a608bf8e33d6a7f61d6c06509de13d554c5748f3ab89eb1c1 to unix:///opt/yocto/kde/scarthgap/build-raspberrypi5/hashserve.sock
| DEBUG: Python function sstate_report_unihash finished
| DEBUG: Executing python function sstate_create_and_sign_package
| DEBUG: Executing shell function sstate_archive_package
| DEBUG: Shell function sstate_archive_package finished
| DEBUG: Python function sstate_create_and_sign_package finished
| DEBUG: Executing python function sstate_hardcode_path_unpack
| DEBUG: Python function sstate_hardcode_path_unpack finished
| DEBUG: Executing python function buildhistory_emit_outputsigs
| DEBUG: Python function buildhistory_emit_outputsigs finished
| DEBUG: Executing python function uninative_changeinterp
| DEBUG: Python function uninative_changeinterp finished
| DEBUG: Python function sstate_task_postfunc finished
| DEBUG: Executing shell function buildhistory_list_pkg_files
| find: ‘/opt/yocto/kde/scarthgap/build-raspberrypi5/tmp/work/cortexa76-poky-linux/libdevmapper/2.03.22/packages-split/*’: No such file or directory
| WARNING: exit code 1 from a shell command.
ERROR: Task (/opt/yocto/kde/scarthgap/sources/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.22.bb:do_package) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 863 tasks of which 846 didn&apos;t need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 seconds

Summary: 1 task failed:
  /opt/yocto/kde/scarthgap/sources/meta-openembedded/meta-oe/recipes-support/lvm2/libdevmapper_2.03.22.bb:do_package</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99779</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Cord-Landwehr">cordlandwehr</who>
    <bug_when>2024-10-05 09:57:32 +0000</bug_when>
    <thetext>I can confirm that this does not happen with 5.0.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99823</commentid>
    <comment_count>2</comment_count>
    <who name="Steve Sakoman">steve</who>
    <bug_when>2024-10-10 15:00:38 +0000</bug_when>
    <thetext>libdevmapper is actually a meta-openembedded recipe, not oe-core.

That said, there is a patch on the oe list to fix this issue:

https://lists.openembedded.org/g/openembedded-devel/message/112734</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99979</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Cord-Landwehr">cordlandwehr</who>
    <bug_when>2024-10-23 19:41:01 +0000</bug_when>
    <thetext>Thanks a lot for the clarification! I wasn&apos;t aware of the nopackages class and thus being a problem in meta-openembedded.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>