[OE-core] postinst questions (was postinst does not finish)

Andreas Müller schnitzeltony at googlemail.com
Wed Apr 24 14:01:16 UTC 2013


On Wed, Apr 24, 2013 at 3:21 PM, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> On Wednesday 24 April 2013 14:04:39 Andreas Müller wrote:
>> as written before: an 'exit 1' within recipe's postinst causes
>> trouble. E.g meta-oe's lxdm does not run systemd.bbclass' code which
>> leaves lxdm in unprepared condition causing start too early and ending
>> in unfinished postinstall.
>
> I think the way forward with this is to avoid doing this at all - let's try to
> get as many of these postinstalls working on the host. Looking at the
> postinstall in the lxdm recipe in meta-oe, I can't see anything that couldn't
> work on the host - $D would just be needed in front of ${libdir} and
> ${localstatedir}.
>
>> A simple workaround for this (we should think of something else later)
>> would be to prepend postinst code within systemd.bbclass (and maybe
>> others too) instead of appending. Hereby we ensure that the code is
>> executed independent of recipe's code. First question: Any objections?
>
> As long as there's no reliance within systemd.bbclass upon anything that a
> recipe's custom postinstall might be doing - this could be problematic for
> example if the custom postinstall were configuring a service which would be
> automatically started as a result of the systemd postinstall (not sure if this
> is how this ends up operating without trying it, but you get the idea.)
>
> Cheers,
> Paul
>
The more I look into all this I think we need a rework on the
pre/post/inst/rm stuff:

* exit allover - nobody can tell which code gets useless
* shebang is only found for recipes inheriting classes taking care..

Andreas




More information about the Openembedded-core mailing list