Just as an added use case (also raised privately), I've also used the state machine options to *delete* files before the image was baked. Probably not a great use case, but there it is.
Still, I think a common feature in both cases is the need to manipulate the contents after `snap prepare-image` has run. There could be two hook points here, one that runs on the unpacked contents before they are shuffled around for the images, and a second one that runs after the shuffling but before the disk image files are baked.
Just as an added use case (also raised privately), I've also used the state machine options to *delete* files before the image was baked. Probably not a great use case, but there it is.
Still, I think a common feature in both cases is the need to manipulate the contents after `snap prepare-image` has run. There could be two hook points here, one that runs on the unpacked contents before they are shuffled around for the images, and a second one that runs after the shuffling but before the disk image files are baked.