File: PVER-minimal.prerm.in

package info (click to toggle)
python2.5 2.5-5%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 52,452 kB
  • ctags: 96,908
  • sloc: ansic: 352,790; python: 317,047; sh: 17,465; asm: 6,564; makefile: 4,300; lisp: 3,678; perl: 3,674; xml: 894; objc: 756; sed: 2
file content (35 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (4)
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
#! /bin/sh -e

case "$1" in
    remove)
	if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
	    echo "Unlinking and removing bytecode for runtime @PVER@"
	fi
	for hook in /usr/share/python/runtime.d/*.rtremove; do
	    [ -x $hook ] || continue
	    $hook rtremove @PVER@ || continue
	done
	dpkg -L @PVER@-minimal \
	    | awk '/\.py$/ {print $0"c\n" $0"o"}' \
	    | xargs rm -f >&2
        ;;
    upgrade)
        dpkg -L @PVER@-minimal \
	    | awk '/\.py$/ {print $0"c\n" $0"o"}' \
	    | xargs rm -f >&2
        ;;
    deconfigure)
        ;;
    failed-upgrade)
        ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

rmdir /usr/local/lib/@PVER@/site-packages 2>/dev/null && \
        rmdir /usr/local/lib/@PVER@ 2>/dev/null || \
        true

#DEBHELPER#