[OE-core] [PATCH][oe-core 1/3] sysstat: don't run populate-volatile.sh update in do_rootfs or without populate-volatile.sh

Martin Jansa martin.jansa at gmail.com
Wed Dec 7 14:57:27 UTC 2011


On Wed, Dec 07, 2011 at 12:48:54PM +0000, Richard Purdie wrote:
> On Tue, 2011-12-06 at 09:35 +0100, Martin Jansa wrote:
> > Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
> > ---
> >  meta/recipes-extended/sysstat/sysstat.inc       |    7 ++++++-
> >  meta/recipes-extended/sysstat/sysstat_10.0.3.bb |    2 +-
> >  2 files changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
> > index 2936f96..ca40ab5 100644
> > --- a/meta/recipes-extended/sysstat/sysstat.inc
> > +++ b/meta/recipes-extended/sysstat/sysstat.inc
> > @@ -22,7 +22,12 @@ do_install() {
> >  }
> >  
> >  pkg_postinst_${PN} () {
> > -        /etc/init.d/populate-volatile.sh update
> > +        if [ -n "$D" ]; then
> > +                exit 1
> > +        fi
> > +        if [ -e /etc/init.d/populate-volatile.sh ]; then
> > +                /etc/init.d/populate-volatile.sh update
> > +        fi
> >  }
> 
> The subject commit message and the code match now, thanks :)
> 
> My only other question is whether we need to run this at first boot
> time? At first boot after rootfs, populate-volatile will run anyway. We
> therefore don't need to run the update as a postinst on device as part
> of first boot as well as it will always be covered if present.
> 
> I therefore think this should be an "exit 0" and the commit message
> should be:
> 
> "sysstat: don't run populate-volatile.sh update in do_rootfs, first boot
> or without populate-volatile.sh"
> 
> Does that make sense?

Ah, this can work as long as nobody tries to add some default /etc/volatile.cache 
to image to start image with default set of volatiles before opkg
postinsts are started.

I'll send updated version as you want so you can pick better variant
(and I'll be happy too with -e /etc/init.d/populate-volatile.sh false).

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111207/d8de8b98/attachment-0002.sig>


More information about the Openembedded-core mailing list