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
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core