[Openembedded-architecture] Changes that switching from smart to dnf will cause
Alexander Kanavin
alexander.kanavin at linux.intel.com
Tue Feb 14 16:53:56 UTC 2017
On 02/14/2017 04:29 PM, Richard Purdie wrote:
> We have situations where we simply don't know in advance if a given
> postinst is going to be able to work at rootfs construction time or
> not. As an example, take the fontconfig postinst. This runs under qemu
> emulation. That emulation can work for some arches and not others. We
> don't really want to have to mark things up to indicate which work and
> which don't. Worse, some target optimisations might work and others
> might not.
I found an example where qemu *is* called directly from postinst - in
eudev and systemd recipes. Unfortunately, they're both broken:
pkg_postinst_eudev-hwdb () {
if test -n "$D"; then
${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update
--root $D
chown root:root $D${sysconfdir}/udev/hwdb.bin
else
udevadm hwdb --update
fi
}
If qemu fails, but chown succeeds, then the whole script will succeed,
and, as a result, it will not get deferred to first boot as it should
have been. You *do* need to explicitly check whether something (that may
fail) did indeed fail, and if it did, then you should halt the script
execution and defer to first boot.
I hope you're now closer to being convinced that this has to be fixed.
Alex
More information about the Openembedded-architecture
mailing list