summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorPedro Ferreira <pedro.silva.ferreira@criticaltechworks.com>2024-08-06 13:59:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-07 15:47:15 +0100
commit738b3b1e6516625c7c99ff81ca28d183bc30e200 (patch)
treec1039e4f43a4f528455516f5cbcab2345aa115dd /meta/classes/buildhistory.bbclass
parent1c3439f87cc0e73f042267b250c54abb71e36864 (diff)
downloadpoky-738b3b1e6516625c7c99ff81ca28d183bc30e200.tar.gz
buildhistory: Fix intermittent package file list creation
The directory that buildhistory_list_pkg_files writes to during do_package is created by do_packagedata so a clean buildhistory doesn't have files-in-package written during the first build since packagedata happens after do_package. Ensure the output package folder is created to avoid missing files-in-package.txt files. Also it ensures that in case of `find` fails we leave with a hard error instead of hiding the error on the for loop. (From OE-Core rev: 8de9b8c1e199896b9a7bc5ed64967c6bfbf84bea) Signed-off-by: Pedro Silva Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass9
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index c3d049aea3..ebb8dafbce 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -599,15 +599,12 @@ buildhistory_list_files_no_owners() {
599 599
600buildhistory_list_pkg_files() { 600buildhistory_list_pkg_files() {
601 # Create individual files-in-package for each recipe's package 601 # Create individual files-in-package for each recipe's package
602 for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do 602 pkgdirlist=$(find ${PKGDEST}/* -maxdepth 0 -type d)
603 for pkgdir in $pkgdirlist; do
603 pkgname=$(basename $pkgdir) 604 pkgname=$(basename $pkgdir)
604 outfolder="${BUILDHISTORY_DIR_PACKAGE}/$pkgname" 605 outfolder="${BUILDHISTORY_DIR_PACKAGE}/$pkgname"
605 outfile="$outfolder/files-in-package.txt" 606 outfile="$outfolder/files-in-package.txt"
606 # Make sure the output folder exists so we can create the file 607 mkdir -p $outfolder
607 if [ ! -d $outfolder ] ; then
608 bbdebug 2 "Folder $outfolder does not exist, file $outfile not created"
609 continue
610 fi
611 buildhistory_list_files $pkgdir $outfile fakeroot 608 buildhistory_list_files $pkgdir $outfile fakeroot
612 done 609 done
613} 610}