This file is indexed.

prerm is in gnats 4.1.0-3.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
#
# Gnats installation script -- written by Brian White <bcwhite@pobox.com>
# (This was my very first attempt at learning perl... please forgive me!)
#
# Forgiving -- rewritten to bash :-) by Milan Zamazal <pdm@debian.org>.
# ...and streamlined with SED by Chad Walstrom <chewie@debian.org>

set -e

###############################################################################
#
# Utility functions
#

# Call arguments and never return error
protect () { "$@" || true; }

###############################################################################
#
# Common initialization for install scripts
#

. /usr/share/debconf/confmodule

protect db_get gnats/site
SITE=${RET:-default}

###############################################################################
#
# Purge operations
#

if [ "$1" = "remove" ] ; then

  #
  # Remove the 'gnats' system from mail
  #
  if [ -f /etc/aliases ] ; then
    TEMPFILE=$(tempfile)
    OLDMAILFILE=/etc/aliases.dpkg-old
    
    sed 's/^[ \t]*\(gnats-admin\|bugs\|query-pr\|$SITE-gnats\)\>\(.*\)$/#\1\2/' \
	/etc/aliases >$TEMPFILE
    cp /etc/aliases $OLDMAILFILE
    chmod 644 $TEMPFILE
    mv $TEMPFILE /etc/aliases
  fi

  #
  # Remove symlinks to databases
  #
  protect rm -f /etc/gnats/db-config/*

  #
  # Remove symlink to gnatsd.user_access
  #
  protect rm -f /etc/gnats/gnatsd.user_access

fi

###############################################################################
#
# Automatically added debhelper stuff
#