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'

and few other places like update-alternatives.bbclass:
meta/classes/update-alternatives.bbclass:            postinst = 
d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n'
meta/classes/update-alternatives.bbclass:            postrm = 
d.getVar('pkg_postrm_%s' % pkg, True) or '#!/bin/sh\n'

Maybe it would be easier to prepend shebang only in one place, just
before it's written in package. Well until someone decides to write some
postinst script in perl :).


> 
> Andreas
> 
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: [email protected]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to