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

Re: Possibly quite a few bugs?



On Tue, Oct 03, 2000 at 03:57:17PM -0500, Gordon Sadler wrote:
> Sorry for all the ruckus. It did indeed appear to be 'proper' to me, but
> I can pinpoint a very specific example that lead to my investigation:
> 
> /var/lib/dpkg/info/realtimebattle.prerm
> #!/bin/sh
> # Prerm
> 
> case "$1" in
>   remove|upgrade|deconfigure)
>     install-info --quiet --remove /usr/info/realtimebattle.info
>   ;;
> 
>   failed-upgrade)
>   ;;
> 
>   *)
>      echo "prerm called with unknown argument \`$1'" >&2
>      exit 0
       ~~~~~~
>   ;;
> esac
> 
> # Automatically added by dh_installdocs
> if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/realtimebattle ]; then
>         rm -f /usr/doc/realtimebattle
> fi
> # End automatically added section
> # Automatically added by dh_installdocs
> if [ "$1" = remove -o "$1" = upgrade ] && \
>    command -v install-docs >/dev/null 2>&1; then
>         install-docs -r realtimebattle
> fi
> # End automatically added section
> 
> Everything looks fine, right? Note if this package is purged or removed,
> neither of the Automatically added lines will exec. The only indication I
> could find as to why not, lead to me believe the quotes were not parsed
> correctly.

Notice the underlined `exit 0' above. It will cause the whole script to
exit, not just the case statement as one might think.

> Good quotes or bad, this package and any others formed this way will not
> exec the Automatically added portions on remove or purge on my machine.

Please file a bug against it/them to get the `exit 0' line removed.

-- 
Digital Electronic Being Intended for Assassination and Nullification



Reply to: