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

Andreas Müller schnitzeltony at googlemail.com
Wed Apr 24 13:03:07 UTC 2013


On Wed, Apr 24, 2013 at 2:36 PM, Martin Jansa <martin.jansa at gmail.com> wrote:
> On Wed, Apr 24, 2013 at 02:04:39PM +0200, Andreas Müller wrote:
>> Hi
>>
>> 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.
>>
>> 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?
>>
>> In case of no objections: Second question: Is shebang in
>> post/pre/install/remove scripts (I saw many scripts without shebang)?
>
> When looking for something else I've noticed
> package.bbclass:do_split_packages
>     if postinst:
>         postinst = '#!/bin/sh\n' + postinst + '\n'
>     if postrm:
>         postrm = '#!/bin/sh\n' + postrm + '\n'
This code is not run - at least for many many recipes. I modified it
for test purpose but did not find my modifications anywhere...

Andreas




More information about the Openembedded-core mailing list