1 # This is a workaround for the race condition between do_image_wic and other
2 # do_image_* tasks. It ensures that no other do_image_* task can be running and
3 # reading the rootfs directory at the same time as do_image_wic is modifying
4 # the /etc/fstab file in the rootfs directory.
6 # A much better fix has been submitted upstream [1], but we can't carry those
7 # modifications to `scripts/lib/wic` from poky easily in meta-agl. So instead
8 # we have this workaround until the upstream fix is accepted and backported.
10 # Serializing the image functions as done here impacts build speed but it's
11 # better to be slow and correct than to be fast and wrong.
13 # [1]: https://lists.openembedded.org/g/openembedded-core/topic/patch_5_6_wic_copy_rootfs/79592787,
14 # https://lists.openembedded.org/g/openembedded-core/topic/patch_6_6_wic_optimise/79592788
15 # and related patches.
19 def get_workaround_wic_typedeps(d):
20 if d.getVar('USING_WIC'):
21 fstypes = d.getVar('IMAGE_FSTYPES').split()
24 # Add the basetype to our set of basetypes in use
28 return ' '.join(basetypes)
32 IMAGE_TYPEDEP:wic += "${@get_workaround_wic_typedeps(d)}"