[Openembedded-architecture] Changes that switching from smart to dnf will cause
Richard Purdie
richard.purdie at linuxfoundation.org
Tue Feb 14 18:49:33 UTC 2017
On Tue, 2017-02-14 at 18:53 +0200, Alexander Kanavin wrote:
> 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.
I think there is an assumption that these postinstalls are run under
set -e which may or may not be the case, I really don't remember.
I do agree that if these are not run under -e, they are broken and that
they do indeed need fixing. What I think needs more discussion is how
we fix them. We have the set -e issue in more than just postinstalls.
Cheers,
Richard
More information about the Openembedded-architecture
mailing list