From: venkata pyla <venkat...@toshiba-tsip.com>
Sometimes `blkid` generates cached files `/run/blkid/blkdid.tab*`, these
cache files are not reproducible and not necessary in the final image,
so remove them to achieve reproducible builds.
Signed-off-by: venkata pyla <venkat...@toshiba-tsip.com>
---
meta/classes/rootfs.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 22449d71..5d493ea2 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -293,6 +293,12 @@ rootfs_export_dpkg_status() {
'${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${ROOTFS_PACKAGE_SUFFIX}'.dpkg_status
}
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_postprocess_clean_blkid_cache"
+rootfs_postprocess_clean_blkid_cache() {
+ # blkid generates cache file which are not reproducible
+ sudo rm -rf "${ROOTFSDIR}/run/blkid/blkid.tab"*
+}
There is no issue to keep this cleaning in `rootfs_finalize`, in fact it is more meaning full to keep all cleanup in finalize methods.
Thanks for the suggestion, I will change in v2.
Thanks,
Vijai Kumar K
+
do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}"
do_rootfs_postprocess[network] = "${TASK_USE_SUDO}"
python do_rootfs_postprocess() {
--
2.20.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
isar-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/isar-users/6340d949-acc1-4283-9713-01f584686929n%40googlegroups.com.
From: venkata pyla <venkat...@toshiba-tsip.com>
Hi,
Updated the patch series based on the feedback.
v2 changes:
- Drop cleaning of blkid cache files in rootfs_postporcess_command and
do it in rootfs_finalize method.
- corrected the condition for scanning the *.core files
venkata pyla (2):
image.bbclass: remove core files generated in rootfs
image.bbclass: clean blkid cache files from rootfs