This file is indexed.

preinst is in python-cairo 1.8.8-2.

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
#!/bin/sh -e



PYCENTRAL=/usr/bin/pycentral

case "$1" in
    upgrade)
        if dpkg --compare-versions "$2" lt 1.8.4-2; then
            if [ -x $PYCENTRAL ]; then
                # explicitly remove old python-central files
                pycentral pkgremove python-cairo
            fi
            # be really really sure about it, in case we update
            # from 1.8.4-1
            for pyversion in 2.4 2.5; do
                if [ -d /usr/lib/python$pyversion/site-packages/cairo/ ]; then
                    rm -f /usr/lib/python$pyversion/site-packages/cairo/__init__.py*
                    rmdir --ignore-fail-on-non-empty /usr/lib/python$pyversion/site-packages/cairo
                fi
            done
        fi
    ;;
    *)
    ;;
esac