From: Trevor Woerner <twoerner@gmail.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>,
Yocto discussion list <yocto@yoctoproject.org>
Subject: Re: do pkg_postinst() scripts need to start with "#!/bin/sh -e"?
Date: Fri, 09 Jan 2015 09:47:22 -0500 [thread overview]
Message-ID: <54AFE9FA.3020103@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.11.1501090841280.12821@localhost>
On 01/09/15 08:42, Robert P. J. Day wrote:
> On Fri, 9 Jan 2015, Robert P. J. Day wrote:
>
>> more manual pedantry -- dev manual, section 5.3.16, suggests:
>>
>> A post-installation function has the following structure:
>>
>> pkg_postinst_PACKAGENAME() {
>> #!/bin/sh -e
>> # Commands to carry out
>> }
>>
>> except that every example of a pkg_postinst() script i've ever seen
>> does not contain that initial hash-bang line, so the manual should
>> at least be reworded to be consistent with the code base.
> i take it back, i just ran across this example in base-passwd.bb:
>
> pkg_postinst_${PN}-update () {
> #!/bin/sh
> if [ -n "$D" ]; then
> exit 0
> fi
> ${sbindir}/update-passwd
> }
>
> which (naturally) doesn't use the "-e" option :-). anyway, what does
> one suggest for consistency across the manual and code base?
Let me be the first (of many, no doubt!) to suggest:
#!/bin/bash
*ducks* :-)
next prev parent reply other threads:[~2015-01-09 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 13:38 do pkg_postinst() scripts need to start with "#!/bin/sh -e"? Robert P. J. Day
2015-01-09 13:42 ` Robert P. J. Day
2015-01-09 14:47 ` Trevor Woerner [this message]
2015-01-10 19:55 ` Robert P. J. Day
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=54AFE9FA.3020103@gmail.com \
--to=twoerner@gmail.com \
--cc=rpjday@crashcourse.ca \
--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.