From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] base-passwd: Move update-passwd into a separate package
Date: Mon, 14 Nov 2011 17:19:30 +0000 [thread overview]
Message-ID: <1321291170.26881.64.camel@ted> (raw)
In-Reply-To: <1321283752.29435.39.camel@phil-desktop>
On Mon, 2011-11-14 at 15:15 +0000, Phil Blundell wrote:
> On Mon, 2011-11-14 at 13:57 +0000, Richard Purdie wrote:
> > +pkg_postinst_${PN}-update () {
> > +#!/bin/sh
> > +if [ "x$D" != "x" ]; then
> > + exit 0
> > +fi
> > +${sbindir}/update-passwd
> > +}
>
> Not that it really matters, but (in the interests of not perpetuating
> unnecessary cruft) this "x" paradigm is unnecessary here. If you quote
> the values then empty strings are permissible, so you could have
> written:
>
> if [ "$D" != "" ]; then
> ...
> fi
>
> But, in fact, all reasonable implementations of /bin/sh support "test
> -n" (it's required by POSIX) so you can write it even more concisely:
>
> if [ -n $D ]; then
> ...
> fi
Right, I picked a bad example to copy :/.
> Of course, it sucks fairly badly that we need to have all this scar
> tissue in the installed postinsts at all. For the opkg backend at
> least, it would be fairly straightforward to add support for an "offline
> postinst" as a separate script, which could be run by rootfs_ipk but
> never actually installed into the rootfs. But I don't know what the
> impact on the other backends would be for that, which I guess might make
> it hard to deploy in practice.
Why can't opkg just wipe the postinst's its run off the disk? Its not
like it needs them any longer...
Cheers,
Richard
next prev parent reply other threads:[~2011-11-14 17:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 12:49 [PATCH] base-passwd: Fix the broken preinst/postinstall Richard Purdie
2011-11-14 12:52 ` Phil Blundell
2011-11-14 13:03 ` Otavio Salvador
2011-11-14 13:37 ` Koen Kooi
2011-11-14 13:57 ` [PATCH] base-passwd: Move update-passwd into a separate package Richard Purdie
2011-11-14 15:15 ` Phil Blundell
2011-11-14 17:19 ` Richard Purdie [this message]
2011-11-14 17:38 ` Phil Blundell
2011-11-14 13:58 ` [PATCH] base-passwd: Fix the broken preinst/postinstall Richard Purdie
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=1321291170.26881.64.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox