Skip to content

Commit

Permalink
Merge pull request #810 from liuming50/drop-prepare_ostree_rootfs-pre…
Browse files Browse the repository at this point in the history
…func

image_types_ostree.bbclass: drop prepare_ostree_rootfs prefunc
  • Loading branch information
pattivacek authored Jul 1, 2021
2 parents ca03912 + bc8f39f commit 68af8d4
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions classes/image_types_ostree.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,13 @@ CONVERSIONTYPES_append = " tar"

TAR_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}"

python prepare_ostree_rootfs() {
import oe.path
import shutil

ostree_rootfs = d.getVar("OSTREE_ROOTFS")
if os.path.lexists(ostree_rootfs):
bb.utils.remove(ostree_rootfs, True)

# Copy required as we change permissions on some files.
image_rootfs = d.getVar("IMAGE_ROOTFS")
oe.path.copyhardlinktree(image_rootfs, ostree_rootfs)
}
prepare_ostree_rootfs[fakeroot] = "1"

do_image_ostree[dirs] = "${OSTREE_ROOTFS}"
do_image_ostree[prefuncs] += "prepare_ostree_rootfs"
do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}"
do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete"
IMAGE_CMD_ostree () {
# Copy required as we change permissions on some files.
tar --xattrs --xattrs-include='*' -cf - -S -C ${IMAGE_ROOTFS} -p . | tar --xattrs --xattrs-include='*' -xf - -C ${OSTREE_ROOTFS}

for d in var/*; do
if [ "${d}" != "var/local" ]; then
rm -rf ${d}
Expand Down

0 comments on commit 68af8d4

Please sign in to comment.