We need to verify that package postinsts are correctly executed in all situations. Something like this: image contains test-postinst-rootfs and test-postinst-delayed packages, one of these runs at rootfs time and the other refuses to run at rootfs time and should run at first boot. They can simply touch a file to indicate that they've been ran. Build the image, check the contents *before* booting, verify that test-postinst-rootfs has ran it's maintainer scripts and -delayed has not. Boot in qemu, then verify that both -rootfs and -delayed have touched their files. Repeat for both sysvinit and systemd, and for rpm/ipk/dpkg (six combinations in total).
*** Bug 5677 has been marked as a duplicate of this bug. ***
Patch sent to contrib and tested on top of the patch sent by Francisco for bug 5319 is working correctly. http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=JosePerez/postinstall-rootfs-boot&id=f1d954cac589c4a9401f4027039eb0a27a4dc64c
Patch sent to the list http://lists.openembedded.org/pipermail/openembedded-core/2016-December/129703.html ---- Note --- Above patch depends of: http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129249.html
Merged on master http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=333890953db568118b34692e9beb15c3c8eecdd0