summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPedro Ferreira <pedro.silva.ferreira@criticaltechworks.com>2024-09-19 11:01:25 +0100
committerSteve Sakoman <steve@sakoman.com>2024-09-27 05:57:35 -0700
commite4de762adbfa38af7c5fdc86b46c840e77f4f984 (patch)
tree5e655abc1d4c546e6000d1f0506a7fcccfe83d4e /meta
parent34538e0dbe0fed269d27c404796479ee6187d865 (diff)
downloadpoky-e4de762adbfa38af7c5fdc86b46c840e77f4f984.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: 6817b012763fc32cdcffe30163a304da3ed59ae1) 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')
-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 4345ffc693..b35508db27 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -597,15 +597,12 @@ buildhistory_list_files_no_owners() {
597 597
598buildhistory_list_pkg_files() { 598buildhistory_list_pkg_files() {
599 # Create individual files-in-package for each recipe's package 599 # Create individual files-in-package for each recipe's package
600 for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do 600 pkgdirlist=$(find ${PKGDEST}/* -maxdepth 0 -type d)
601 for pkgdir in $pkgdirlist; do
601 pkgname=$(basename $pkgdir) 602 pkgname=$(basename $pkgdir)
602 outfolder="${BUILDHISTORY_DIR_PACKAGE}/$pkgname" 603 outfolder="${BUILDHISTORY_DIR_PACKAGE}/$pkgname"
603 outfile="$outfolder/files-in-package.txt" 604 outfile="$outfolder/files-in-package.txt"
604 # Make sure the output folder exists so we can create the file 605 mkdir -p $outfolder
605 if [ ! -d $outfolder ] ; then
606 bbdebug 2 "Folder $outfolder does not exist, file $outfile not created"
607 continue
608 fi
609 buildhistory_list_files $pkgdir $outfile fakeroot 606 buildhistory_list_files $pkgdir $outfile fakeroot
610 done 607 done
611} 608}