summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs-postcommands.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 53a4fda4b1..c8f18c6702 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -14,6 +14,9 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
14# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled 14# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
15ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' 15ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
16 16
17# Generates test data file with data store variables expanded in json format
18ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
19
17# Write manifest 20# Write manifest
18IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest" 21IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
19ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " 22ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
@@ -300,3 +303,18 @@ rootfs_check_host_user_contaminated () {
300rootfs_sysroot_relativelinks () { 303rootfs_sysroot_relativelinks () {
301 sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT} 304 sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
302} 305}
306
307# Generated test data json file
308python write_image_test_data() {
309 from oe.data import export2json
310
311 testdata = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True))
312 testdata_link = "%s/%s.testdata.json" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME', True))
313
314 bb.utils.mkdirhier(os.path.dirname(testdata))
315 export2json(d, testdata)
316
317 if os.path.lexists(testdata_link):
318 os.remove(testdata_link)
319 os.symlink(os.path.basename(testdata), testdata_link)
320}