4
# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com )
5
# Created On : Fri Nov 14 12:16:39 2003
6
# Created On Node : glaurung.green-gryphon.com
7
# Last Modified By : Manoj Srivastava
8
# Last Modified On : Mon Dec 1 23:18:58 2003
9
# Last Machine Used: glaurung.green-gryphon.com
11
# Status : Unknown, Use with caution!
15
# arch-tag: a4c1a888-137d-4800-98f8-93d0365422d8
17
# This program is free software; you can redistribute it and/or modify
18
# it under the terms of the GNU General Public License as published by
19
# the Free Software Foundation; either version 2 of the License, or
20
# (at your option) any later version.
22
# This program is distributed in the hope that it will be useful,
23
# but WITHOUT ANY WARRANTY; without even the implied warranty of
24
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
# GNU General Public License for more details.
27
# You should have received a copy of the GNU General Public License
28
# along with this program; if not, write to the Free Software
29
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33
# Abort if any command returns an error value
38
if [ -z "$package_name" ]; then
39
print >&2 "Internal Error. Please report a bug."
44
# This script is called as the first step in removing the package from
45
# the system. This includes cases where the user explicitly asked for
46
# the package to be removed, upgrade, automatic removal due to conflicts,
47
# and deconfiguration due to temporary removal of a depended-on package.
49
# Info files should be uninstalled from the dir file in any case.
50
##: install-info --quiet --remove /usr/info/${package_name}.info
54
# This package about to be removed.
57
# Remove package-specific directories from /usr/local. Don't try
58
# to remove standard directories such as /usr/local/lib.
59
##: if test -d /usr/local/lib/${package_name}; then
60
##: rmdir /usr/local/lib/${package_name} || true
63
# Deactivate menu-methods script.
64
##: chmod a-x /etc/menu-methods/${package_name}
66
# Withdraw our version of a program.
67
##: update-alternatives --remove program /usr/bin/alternative
69
# Get rid of the installed docs
70
##: if which install-docs >/dev/null 2>&1; then
71
##: install-docs -r $package_name
74
# Get rid of the byte compiled files
75
##: if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then
76
##: /usr/lib/emacsen-common/emacs-package-remove $package_name
79
if [ -L /usr/doc/$package_name ]; then
80
rm -f /usr/doc/$package_name
83
# There are two sub-cases:
84
if test "${2+set}" = set; then
85
if test "$2" != in-favour; then
86
echo "$0: undocumented call to \`prerm $*'" 1>&2
89
# We are being removed because of a conflict with package $3
90
# (version $4), which is now being installed.
94
# The package is being removed in its own right.
99
if test "$2" != in-favour -o "$5" != removing; then
100
echo "$0: undocumented call to \`prerm $*'" 1>&2
103
# Package $6 (version $7) which we depend on is being removed due
104
# to a conflict with package $3 (version $4), and this package is
105
# being deconfigured until $6 can be reinstalled.
110
# Prepare to upgrade FROM THIS VERSION of this package to version $2.
113
if [ -L /usr/doc/$package_name ]; then
114
rm -f /usr/doc/$package_name
119
# Prepare to upgrade from version $2 of this package TO THIS VERSION.
120
# This is only used if the old version's prerm couldn't handle it,
121
# and returned non-zero. (Fix old prerm bugs here.)
125
*) echo "$0: didn't understand being called with \`$1'" 1>&2