All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: "Andreas Müller" <schnitzeltony@googlemail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: postinst questions (was postinst does not finish)
Date: Wed, 24 Apr 2013 14:36:08 +0200	[thread overview]
Message-ID: <20130424123608.GI3217@jama> (raw)
In-Reply-To: <CALbNGRQ4vS=kvgqNZyS5G9HRBE1ixrta_uF+PvzOPZvfjbhNkQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]

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
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2013-04-24 12:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 12:04 postinst questions (was postinst does not finish) Andreas Müller
2013-04-24 12:36 ` Martin Jansa [this message]
2013-04-24 13:03   ` Andreas Müller
2013-04-24 13:21 ` Paul Eggleton
2013-04-24 14:01   ` Andreas Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130424123608.GI3217@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=schnitzeltony@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.