aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/apport-support.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python2.7/patches/apport-support.dpatch')
-rw-r--r--examples/python2.7/patches/apport-support.dpatch42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/python2.7/patches/apport-support.dpatch b/examples/python2.7/patches/apport-support.dpatch
new file mode 100644
index 0000000..a04ca90
--- /dev/null
+++ b/examples/python2.7/patches/apport-support.dpatch
@@ -0,0 +1,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()
+