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

Re: /etc/shells management



On Sat, Sep 06, 2003 at 03:32:58PM -0500, Manoj Srivastava wrote:
> case "$1" in
>   configure)
>     # Configure this package.  If the package must prompt the user for
>     # information, do it here.
>     # There are three sub-cases:
>     if test "${2+set}" != set; then

Man, that's ugly.  I use:

if [ -n "$var" ]; then
fi

for this sort of thing.  However, that does depend on a certain other
case you handle never happening:

>     elif test -z "$2" -o "$2" = "<unknown>"; then

file:///usr/share/doc/debian-policy/policy.html/ch-maintainerscripts.html
is my Bible when I'm writing/editing maintainer scripts.  It's
documented nowhere that I need to handle the argument '<unknown>'.

Where did you come by this, and if it's something we should worry about,
why isn't it documented in Policy?

To me it looks like whoever wrote this code extrapolated too generously
from the output of "dpkg -l" on the name of a package that has been
purged.  But I haven't gone grubbing around in dpkg's source code, so I
don't know for sure...

-- 
G. Branden Robinson                |     Don't use nuclear weapons to
Debian GNU/Linux                   |     troubleshoot faults.
branden@debian.org                 |     -- US Air Force Instruction 91-111
http://people.debian.org/~branden/ |

Attachment: pgp4s4tWDlF7l.pgp
Description: PGP signature


Reply to: