[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Skeleton maintainer scripts



Adam P. Harris writes:> 
> Charles Briscoe-Smith <cpbs@debian.org> writes:
>[...] 
> > # I've attempted to document all the cases as best I can.  What's more,
> > # I even have reason to believe this script works!  It does nothing,
> > # but if you replace the lines with a `:' at the left margin with your
> > # code, it'll be called at the correct places.
> 
> Cut this para.

I agree, even more since nobody reads it anyway, then you can replace
the colons with comments like # your code here

>[...] 
> > # Some general points relevant to preinst scripts (gleaned from the
> > # Debian policy manual version 2.4.0.0, and the packaging manual):
> 
> Trim down to one line
> 
> > # - Trap all errors
> > # - Don't generate any unnecessary output
> > # - Do not prompt the user in this script; do prompting in postinst
> > # - Vitally important messages to the system administrator (NOT the end
> > #   user) should be displayed by the postinst, then wait for return to
> > #   be pressed.
> > # - Be idempotent: make sure nothing bad will happen if the script is
> > #   called twice where it would usually be called once.
> > # - Return an exit status of zero if you succeed, non-zero if you fail
> > # - Remember stdout may be redirected (e.g. to a pipe) for logging
> > #   purposes.

I would kepp this in entirety in one script and in others have oneliner
that tells: for general points see scriptxx

>[...] 
> > :
> 
> Why these colons here against the left column?  The colons aren't
> needed here, and I don't like breaking the indent flow.

Was your intention to use something that is guaranteed to bomb
so the maintainer is forced to think at these points? I would
(still) use comments like 
         # your code here

>[...] 

t.aa


--
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: