summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPedro Ferreira <pedro.silva.ferreira@criticaltechworks.com>2024-08-06 13:59:54 +0100
committerSteve Sakoman <steve@sakoman.com>2024-09-25 05:07:47 -0700
commit4c0730341e42c9130ac62365091ad800f5149ba8 (patch)
treef7fb53a0811a997e4453facdae8db2d718bec781 /meta/classes
parentd7249c50ecff3272afa699000884f17cce82222d (diff)
downloadpoky-4c0730341e42c9130ac62365091ad800f5149ba8.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: eb94b09a9183e0b0d9cfc45287e0967ae185c099) Signed-off-by: Pedro Silva Ferreira <Pedro.Silva.Ferreira@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8de9b8c1e199896b9a7bc5ed64967c6bfbf84bea) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes')
-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 fd53e92402..d219519f86 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}