This file is indexed.

postinst is in lintian 2.5.6.

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
#
# Lintian requires a UTF-8 locale in order to properly do man page tests.
# Generate one at installation time so that we're guaranteed to have one.

set -eu

locale_dir=/var/lib/lintian/locale

gen_locale() {
    echo 'Generating en_US.UTF-8 locale for internal Lintian use....'
    mkdir -p "$locale_dir"
    if ! localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias \
                --quiet "$locale_dir"/en_US.UTF-8 ; then
        rm -rf "$locale_dir"
        exit 1
    fi
}

if [ "$1" = "configure" ]; then
    if [ ! -f "$locale_dir/en_US.UTF-8/LC_CTYPE" ] &&
	[ -f /usr/share/locale/locale.alias ] &&
	[ ! -d /usr/lib/locale/C.UTF-8/ ] ; then

	# handle upgrades from the previous, incorrect, directory:
	rm -rf "$locale_dir"
	gen_locale
    elif [ -d "$locale_dir" -a -d /usr/lib/locale/C.UTF-8/ ] ; then
        # handle upgrades into a system with the libc C.UTF-8
        rm -rf "$locale_dir"
    fi
fi

if [ "$1" = "triggered" ]; then
    # Remove our locale directory in all cases:
    # If locales is removed, locales-all should provide us the locale
    # we want.
    # If locales is upgraded, we should still regenerate our locale.
    # If the libc provided C.UTF-8 appeared, we do not need our locale
    # anymore.
    rm -rf "$locale_dir"

    if [ -f /usr/share/locale/locale.alias ] &&
	[ ! -d /usr/lib/locale/C.UTF-8/ ] ; then

	gen_locale
    fi
fi