From 248a128b32ef0567a0ed6074f48c5c95347e282d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Sun, 11 Jul 2010 17:45:32 +0200
Subject: [PATCH] * move "-e" from shebang to "set -e" line (in case script is
 run by hand) * bump PREVVER to 2.6.5+20100630-2~ and use -m compileall in
 debian/python-minimal.postinst

---
 debian/python-minimal.postinst     | 7 +++----
 debian/python-minimal.prerm        | 4 +++-
 debian/python.postinst.in          | 3 ++-
 debian/python.postrm.in            | 3 ++-
 debian/python.preinst.in           | 3 ++-
 debian/python.prerm.in             | 3 ++-
 debian/rules                       | 2 +-
 runtime.d/public_modules.rtinstall | 3 ++-
 runtime.d/public_modules.rtremove  | 3 ++-
 9 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/debian/python-minimal.postinst b/debian/python-minimal.postinst
index 63645b1..b0637f4 100644
--- a/debian/python-minimal.postinst
+++ b/debian/python-minimal.postinst
@@ -1,7 +1,6 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
-# runpy.py is not available in pythonX.Y-minimal and thus "python -m compileall"
-# cannot be used, temporary workaround:
-python /usr/lib/python2.6/compileall.py /usr/share/python/ >/dev/null
+python -m compileall /usr/share/python/ >/dev/null
 
 #DEBHELPER#
diff --git a/debian/python-minimal.prerm b/debian/python-minimal.prerm
index 513b85d..2f12cb1 100644
--- a/debian/python-minimal.prerm
+++ b/debian/python-minimal.prerm
@@ -1,4 +1,6 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
+
 find /usr/share/python/ -name '*.py[oc]' -delete
 
 #DEBHELPER#
diff --git a/debian/python.postinst.in b/debian/python.postinst.in
index 5ed94d9..83b5da5 100644
--- a/debian/python.postinst.in
+++ b/debian/python.postinst.in
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 new_config_file()
 {
diff --git a/debian/python.postrm.in b/debian/python.postrm.in
index a818ee3..0ffa3ce 100644
--- a/debian/python.postrm.in
+++ b/debian/python.postrm.in
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 case "$1" in
     purge)
diff --git a/debian/python.preinst.in b/debian/python.preinst.in
index 746aa79..720a6fe 100644
--- a/debian/python.preinst.in
+++ b/debian/python.preinst.in
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 # remove the python alternatives before installing our own python link
 
diff --git a/debian/python.prerm.in b/debian/python.prerm.in
index cafed8e..0218969 100644
--- a/debian/python.prerm.in
+++ b/debian/python.prerm.in
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 case "$1" in
     remove)
diff --git a/debian/rules b/debian/rules
index e21d9f8..0df5a3d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,7 +20,7 @@ export NVER=2.7
 export PVER=python2.6
 
 PREVVER	:= $(shell awk '/^python/ && NR > 1 {print substr($$2,2,length($$2)-2); exit}' debian/changelog)
-PREVVER := 2.6.5+20100616-1~
+PREVVER := 2.6.5+20100630-2~
 
 PWD		:= $(shell pwd)
 
diff --git a/runtime.d/public_modules.rtinstall b/runtime.d/public_modules.rtinstall
index 92a297b..4dbc1bf 100755
--- a/runtime.d/public_modules.rtinstall
+++ b/runtime.d/public_modules.rtinstall
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 VERSION=${2#python}
 if which python >/dev/null 2>&1 && which pycompile >/dev/null 2>&1; then
diff --git a/runtime.d/public_modules.rtremove b/runtime.d/public_modules.rtremove
index 87b5a43..a35738b 100755
--- a/runtime.d/public_modules.rtremove
+++ b/runtime.d/public_modules.rtremove
@@ -1,4 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
+set -e
 
 VERSION=${2#python}
 if which python >/dev/null 2>&1 && which pyclean >/dev/null 2>&1; then
-- 
GitLab