All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Trevor Woerner <twoerner@gmail.com>
Cc: Yocto discussion list <yocto@yoctoproject.org>
Subject: Re: do pkg_postinst() scripts need to start with "#!/bin/sh -e"?
Date: Sat, 10 Jan 2015 14:55:12 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.11.1501101453430.11931@localhost> (raw)
In-Reply-To: <54AFE9FA.3020103@gmail.com>

On Fri, 9 Jan 2015, Trevor Woerner wrote:

> 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* :-)

  "you're a funny guy, sully ... i'll kill you last." :-)

on a serious note, however, the documentation really should agree with
the code, one way or the other, someone can just pick a standard and
go with that. onward ...

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


      reply	other threads:[~2015-01-10 19:55 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
2015-01-10 19:55     ` Robert P. J. Day [this message]

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=alpine.LFD.2.11.1501101453430.11931@localhost \
    --to=rpjday@crashcourse.ca \
    --cc=twoerner@gmail.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.