All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: "Rifenbark, Scott M" <scott.m.rifenbark@intel.com>,
	"Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: yocto@yoctoproject.org
Subject: Re: FW: stupid question about post-installation scripts
Date: Mon, 25 Nov 2013 17:01:10 +0000	[thread overview]
Message-ID: <2877100.Goa8NZvDMD@helios> (raw)
In-Reply-To: <41DEA4B02DBDEF40A0F3B6D0DDB1237983F511F7@ORSMSX101.amr.corp.intel.com>

On Monday 25 November 2013 15:21:41 Rifenbark, Scott M wrote:
> >From: Robert P. J. Day [mailto:rpjday@crashcourse.ca]
> >Sent: Sunday, November 24, 2013 2:37 AM
> >To: Rifenbark, Scott M
> >Subject: stupid question about post-installation scripts
> >
> >  when one defines pkg_postinst scripts, are those scripts invoked at
> >
> >*both* root filesystem creation time and first boot time? so that one needs
> >to manually check the value of ${D} to decide whether to run them, say, at
> >first boot time?

Not both - it's either-or; i.e. it will be run at rootfs creation time and if 
it fails then, it will be run on first boot. Yes you can use the value of $D 
(note: *not* ${D}!) to find out where the script is being called from, if 
necessary.

> >  i'm reading the section here:
> >http://www.yoctoproject.org/docs/latest/dev-manual/dev-> >manual.html#post-installation-scripts
> >
> >and i know i've seen elsewhere scripts explicitly checking the value of the
> >${D} prefix to determine when they're being invoked. it *seems* like
> >that's what's happening, but if that's the case, it can probably be said
> >much more clearly.

The answer is, you can do this if you have to, but ideally you shouldn't need 
to. In the ideal situation the script should be written such that it functions 
equally well no matter where it executes; that avoids the need to run anything 
on first boot, *and* (assuming you have package management enabled for the 
target) it will work if the package is installed on the target some time 
afterwards.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


  parent reply	other threads:[~2013-11-25 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.02.1311240533220.32547@oneiric>
2013-11-25 15:21 ` FW: stupid question about post-installation scripts Rifenbark, Scott M
2013-11-25 15:56   ` Bryan Evenson
2013-11-25 17:29     ` Robert P. J. Day
2013-11-25 17:41       ` Bryan Evenson
2013-11-25 17:01   ` Paul Eggleton [this message]
2013-11-25 17:06     ` FW: " Paul Eggleton

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=2877100.Goa8NZvDMD@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=rpjday@crashcourse.ca \
    --cc=scott.m.rifenbark@intel.com \
    --cc=yocto@yoctoproject.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 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.