diff options
-rw-r--r-- | classes/image_types_ostree.bbclass | 20 |
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 | ||
20 | REQUIRED_DISTRO_FEATURES = "usrmerge" | 20 | REQUIRED_DISTRO_FEATURES = "usrmerge" |
21 | TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" | 21 | TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" |
22 | |||
23 | python 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 | |||
22 | do_image_ostree[dirs] = "${OSTREE_ROOTFS}" | 36 | do_image_ostree[dirs] = "${OSTREE_ROOTFS}" |
23 | do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" | 37 | do_image_ostree[prefuncs] += "prepare_ostree_rootfs" |
24 | do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete" | 38 | do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete" |
25 | IMAGE_CMD_ostree () { | 39 | IMAGE_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} |