3 # Abort if any command returns an error value
6 # This is filled in by debian/rules
9 # This script is called as the first step in removing the package from
10 # the system. This includes cases where the user explicitly asked for
11 # the package to be removed, upgrade, automatic removal due to conflicts,
12 # and deconfiguration due to temporary removal of a depended-on package.
16 # This package about to be removed.
18 if [ -L /usr/doc/$package_name ]; then
19 rm -f /usr/doc/$package_name
22 # There are two sub-cases:
23 if test "${2+set}" = set; then
24 if test "$2" != in-favour; then
25 echo "$0: undocumented call to \`prerm $*'" 1>&2
28 # We are being removed because of a conflict with package $3
29 # (version $4), which is now being installed.
33 # The package is being removed in its own right.
38 if test "$2" != in-favour || test "$5" != removing; then
39 echo "$0: undocumented call to \`prerm $*'" 1>&2
42 # Package $6 (version $7) which we depend on is being removed due
43 # to a conflict with package $3 (version $4), and this package is
44 # being deconfigured until $6 can be reinstalled.
49 # Prepare to upgrade FROM THIS VERSION of this package to version $2.
51 if [ -L /usr/doc/$package_name ]; then
52 rm -f /usr/doc/$package_name
57 # Prepare to upgrade from version $2 of this package TO THIS VERSION.
58 # This is only used if the old version's prerm couldn't handle it,
59 # and returned non-zero. (Fix old prerm bugs here.)
63 *) echo "$0: didn't understand being called with \`$1'" 1>&2
69 if [ -x /usr/sbin/install-docs ]; then
70 /usr/sbin/install-docs -r debian-policy
71 /usr/sbin/install-docs -r debian-menu-policy
72 /usr/sbin/install-docs -r debian-mime-policy
73 /usr/sbin/install-docs -r debian-perl-policy
74 /usr/sbin/install-docs -r debian-policy-process
75 /usr/sbin/install-docs -r debconf-spec
76 /usr/sbin/install-docs -r fhs