This file is indexed.

preinst is in python-coverage 4.5+dfsg.1-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
#! /bin/sh
# Pre-install script for ‘python-coverage’.
#
# Manual page: ‘dh_installdeb(1)’.

set -e

# Summary of ways this script can be called:
#   * <new-preinst> install
#   * <new-preinst> install <old-version>
#   * <new-preinst> upgrade <old-version>
#   * <old-preinst> abort-upgrade <new-version>
# For details, see the Debian Policy §6.5 in the ‘debian-policy’ package
# or on the web at <URL:http://www.debian.org/doc/debian-policy/>.

action="$1"

case "$action" in
    upgrade)
        old_version="$2"
        for python in $(pyversions --supported) ; do
            htmlfiles_dir="/usr/lib/${python}/dist-packages/coverage/htmlfiles"
            if [ -d "$htmlfiles_dir" ] && [ ! -L "$htmlfiles_dir" ] ; then
                # The ‘htmlfiles’ location should be platform-independent.
                # The new package will replace the directory with a symlink.
                rm -rf "$htmlfiles_dir"
            fi
        done
        ;;

    install|abort-upgrade)
        ;;

    *)
        printf "preinst called with unknown action ‘%s’\n" "$action" >&2
        exit 1
        ;;

esac




# Local variables:
# coding: utf-8
# mode: shell-script
# End:
# vim: fileencoding=utf-8 filetype=sh :