Package: sed
Version: 4.1.5-1
Severity: wishlist
Tags: patch

I suggest to deregister the documentation during the "deconfigure"
path, as in the "remove" one.  You could also continue doing it during
the "upgrade" and "failed-upgrade" cases, in case this document might
ever get removed; then you can a avoid a preinst version check in new
versions, which would have to be supported (at least) until the
following stable release.  That's all the cases, so you could actually
just drop the prerm argument checking.

--- /var/lib/dpkg/info/sed.prerm        2006-04-30 17:08:11.000000000 -0400
+++ /tmp/sed.prerm      2006-06-18 15:18:30.000000000 -0400
@@ -1,16 +1,22 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 pkg=sed
 
 case "$1" in
-       (upgrade) ;;
-       (remove) ;;
-       (*) exit 0 ;;
-esac
+remove|deconfigure)
+       install-info --quiet --remove sed
+       ;;
+
+upgrade|failed-upgrade)
+       ;;
 
-install-info --quiet --remove sed
+*)
+       echo "$0: Undocumented call: \"[EMAIL PROTECTED]"" >&2
+       exit 1
+       ;;
+esac
 
 if [ -L /usr/doc/$pkg ]; then
        rm -f /usr/doc/$pkg
 fi
-

The abort-* cases should reregister it.


--- /var/lib/dpkg/info/sed.postinst     2006-04-30 17:08:11.000000000 -0400
+++ /tmp/sed.postinst   2006-06-18 15:22:47.000000000 -0400
@@ -1,10 +1,19 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 pkg=sed
 
-if [ ! "$1" = "configure" ]; then
-       exit 0
-fi
-
-install-info --quiet --section "General commands" "General commands" \
+s="General commands"
+case "$1" in
+configure|abort-remove|abort-deconfigure)
+       install-info --quiet --section "$s" "$s" \
                /usr/share/info/sed.info
+       ;;
+abort-upgrade)
+       # Nothing to undo
+       :;
+       ;;
+*)
+       echo "$0: Undocumented call: \"[EMAIL PROTECTED]"" >&2
+       exit 1;
+esac


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to