aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/apport-support.dpatch
blob: a04ca90be82adc91b2e40dab7950a40800a20929 (plain)
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
#! /bin/sh -e

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
	echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
        exit 1
esac
exit 0

--- Lib/site.py	2004-07-20 12:28:28.000000000 +1000
+++ Lib/site.py	2006-11-09 09:28:32.000000000 +1100
@@ -393,6 +393,14 @@
     # this module is run as a script, because this code is executed twice.
     if hasattr(sys, "setdefaultencoding"):
         del sys.setdefaultencoding
+    # install the apport exception handler if available
+    try:
+        import apport_python_hook
+    except ImportError:
+        pass
+    else:
+        apport_python_hook.install()
+
 
 main()