[4/5] meta/bitbake.conf: Use custom disk usage command for buildstats

Message ID 20240112061257.22241-5-ubely@ilbers.de
State Awaiting Upstream
Headers show
Series [1/5] buildstats: Sync code base with openembedded-core 2022-04.15 | expand

Commit Message

Uladzimir Bely Jan. 12, 2024, 6:12 a.m. UTC
In Isar, default "du -sh" disk usage command produces multiple
"Permission denied" warnings. Contrary to OE, Isar uses "sudo"
for rootfs creation and some path may be not available.

Also, some subpaths of rootfs may be mounted during statistics
collecting, so we have to limit "du" by one filesystem.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 meta/conf/bitbake.conf | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 80dc01c7..a90edc4b 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -159,6 +159,8 @@  INHERIT += "isar-events sstate"
 # Buildstats requires IMAGE_ROOTFS to be always defined
 IMAGE_ROOTFS ??= "${WORKDIR}/rootfs"
 INHERIT += "${@'buildstats' if d.getVar('USE_BUILDSTATS') == '1' else ''}"
+# Use custom disk usage command to avoid "Permission denied" warnings
+BUILDSTATS_DISK_USAGE_CMD = "sudo du -shx"
 
 # Default values for ccache
 USE_CCACHE ??= "0"