* do pkg_postinst() scripts need to start with "#!/bin/sh -e"?
@ 2015-01-09 13:38 Robert P. J. Day
2015-01-09 13:42 ` Robert P. J. Day
0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2015-01-09 13:38 UTC (permalink / raw)
To: Yocto discussion list
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.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: do pkg_postinst() scripts need to start with "#!/bin/sh -e"?
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
0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2015-01-09 13:42 UTC (permalink / raw)
To: Yocto discussion list
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?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: do pkg_postinst() scripts need to start with "#!/bin/sh -e"?
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
0 siblings, 1 reply; 4+ messages in thread
From: Trevor Woerner @ 2015-01-09 14:47 UTC (permalink / raw)
To: Robert P. J. Day, Yocto discussion list
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* :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: do pkg_postinst() scripts need to start with "#!/bin/sh -e"?
2015-01-09 14:47 ` Trevor Woerner
@ 2015-01-10 19:55 ` Robert P. J. Day
0 siblings, 0 replies; 4+ messages in thread
From: Robert P. J. Day @ 2015-01-10 19:55 UTC (permalink / raw)
To: Trevor Woerner; +Cc: Yocto discussion list
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
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-10 19:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.