summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/image_types_ostree.bbclass20
1 files changed, 15 insertions, 5 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index a3eae24..7275867 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -19,14 +19,24 @@ CONVERSIONTYPES_append = " tar"
19 19
20REQUIRED_DISTRO_FEATURES = "usrmerge" 20REQUIRED_DISTRO_FEATURES = "usrmerge"
21TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" 21TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}"
22
23python prepare_ostree_rootfs() {
24 import oe.path
25 import shutil
26
27 ostree_rootfs = d.getVar("OSTREE_ROOTFS")
28 if os.path.lexists(ostree_rootfs):
29 bb.utils.remove(ostree_rootfs, True)
30
31 # Copy required as we change permissions on some files.
32 image_rootfs = d.getVar("IMAGE_ROOTFS")
33 oe.path.copyhardlinktree(image_rootfs, ostree_rootfs)
34}
35
22do_image_ostree[dirs] = "${OSTREE_ROOTFS}" 36do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
23do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" 37do_image_ostree[prefuncs] += "prepare_ostree_rootfs"
24do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete" 38do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete"
25IMAGE_CMD_ostree () { 39IMAGE_CMD_ostree () {
26 cp -a ${IMAGE_ROOTFS}/* ${OSTREE_ROOTFS}
27 chmod a+rx ${OSTREE_ROOTFS}
28 sync
29
30 for d in var/*; do 40 for d in var/*; do
31 if [ "${d}" != "var/local" ]; then 41 if [ "${d}" != "var/local" ]; then
32 rm -rf ${d} 42 rm -rf ${d}