Currently if anything goes wrong in pkg_postinst() script, the problem is swept under a carpet in two ways: 1) scripts are not run using sh -e, so only the if the last command in a script fails, the script fails. 2) even if the script does fail, it's taken as a request to defer the script execution to first boot of the image, which may mask a problem or a regression somewhere. Deferral to first boot needs to be requested explicitly by calling a 'hook' command from the script. I've done some work to address this here, needs to be completed: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4-postinst-fix Discussion: http://lists.openembedded.org/pipermail/openembedded-architecture/2017-February/000422.html
Related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=9261
Patchset merged to master: http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146895.html