Debian Codegraph @

debian/pypy3.prerm.in

raw
1 #!/bin/sh
2
3 if [ '#ARCH#' = 'i386' ]; then
4 pypy3 -c '' 2>/dev/null
5 if [ $? -eq 132 ]; then
6 echo "PyPy doesn't appear to support this CPU." >&2
7 echo "SSE2 is required." >&2
8 exit 0
9 fi
10 fi
11
12 set -e
13
14 hook() {
15 local action old new
16 hook=$1
17 action=$2
18 version='pypy3_#VERSION#'
19 echo "running pypy3 $action hooks for $version"
20 for script in /usr/lib/pypy3/runtime.d/*."$hook"; do
21 [ -x "$script" ] || continue
22 if ! "$script" "$action" "$version"; then
23 echo >&2 "error running pypy3 $action hook $(basename "$script")"
24 return 1
25 fi
26 done
27 }
28
29 # We may have to clean up after pypy3-lib-testsuite, too, if we're
30 # removed before it
31 case "$1" in
32 remove|deconfigure)
33 hook rtremove rtremove
34 pypy3clean /usr/lib/pypy3.11
35 ;;
36
37 upgrade)
38 pypy3clean /usr/lib/pypy3.11
39 ;;
40
41 failed-upgrade)
42 ;;
43
44 *)
45 echo "prerm called with unknown argument \`$1'" >&2
46 exit 1
47 ;;
48 esac
49
50 #DEBHELPER#
51
52 exit 0
53 # vim:set et ts=4 sw=4: