Topics

wic files with multiple rootfs source plugins and rm_work enabled

Joel A Cohen
 

I'm trying to create a multi-partition image, and just ran across a difficult to track-down issue that I'm a little curious about.

It's the intersection of rm_work, and needing to get to the sysroot of another image recipe. RM_WORK_EXCLUDE_ITEMS is respected insomuch as I have an empty directory named "rootfs" that remains in tmp/work/.../secondary-image/rootfs

However, a task in rm_work named "rm_work_rootfs" has a "cleandirs" flag set on the rootfs directory. This seems redundant and confusing to me. Why does the rootfs directory need special handling?

It took me quite a bit to track down how this works. Is this the correct way to do this?

It actually seems to be that the source plugin should be smart enough to populate the sysroot of images as needed, rather than needing to prevent cleaning them.

Thanks,
Aaron

My recipes contain:

WKS_FILE = "dev.wks"
DEPENDS += "secondary-image"


# The following doesn't work, the rootfs directory will be empty
RM_WORK_EXCLUDE_ITEMS += "rootfs"
# The following is needed...
rm_work_rootfs[cleandirs] = ""


dev.wks:
part / --source rootfs --fstype=ext4 --label platform --align 1024 --use-uuid
part /usr/local --source rootfs --rootfs-dir=secondary-image --size 4096 --fstype=ext4 --use-uuid