[v2,2/2] image.bbclass: clean blkid cache files from rootfs

Message ID 20230809134703.8475-3-venkata.pyla@toshiba-tsip.com
State Accepted, archived
Headers show
Series Fix reproducible issues in armhf | expand

Commit Message

venkata.pyla@toshiba-tsip.com Aug. 9, 2023, 1:47 p.m. UTC
From: venkata pyla <venkata.pyla@toshiba-tsip.com>

blkid generates cache files when `blkid` command is used during build,
these cache files in rootfs causes non-reproducible rootfs, so
delete these files in the cleanup.

Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
 meta/classes/image.bbclass | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9aa6c856..d9fc04eb 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -459,6 +459,9 @@  do_rootfs_finalize() {
             mv "${ROOTFSDIR}/etc/apt/sources-list" \
                 "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
         fi
+
+        rm -f "${ROOTFSDIR}/run/blkid/blkid.tab"
+        rm -f "${ROOTFSDIR}/run/blkid/blkid.tab.old"
 EOSUDO
 
     # Sometimes qemu-user-static generates coredumps in chroot, move them