From 790c75f950b1220e113ec7f5f3b62674e7a43503 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Thu, 9 Sep 2010 20:56:47 +0200
Subject: [PATCH] * Use versioned interpreter name rather than "python" only in
 python-minimal.postinst (closes: 595826) * ducument how to regenerate
 dist_fallback file

---
 README.derivatives                | 10 ++++++++++
 debian/changelog                  |  4 ++--
 debian/python-minimal.postinst    |  6 ------
 debian/python-minimal.postinst.in |  6 ++++++
 pydist/Makefile                   |  4 ++--
 5 files changed, 20 insertions(+), 10 deletions(-)
 delete mode 100644 debian/python-minimal.postinst
 create mode 100644 debian/python-minimal.postinst.in

diff --git a/README.derivatives b/README.derivatives
index 1c1968b..762806e 100644
--- a/README.derivatives
+++ b/README.derivatives
@@ -25,3 +25,13 @@ How to bump minimum required python version by dh_python2?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * Open debpython/depends.py file and edit `MINPYCDEP` variable around line 26
+
+
+How to regenerate dist_fallback file for dh_python2?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Please note that we recommend to extend this file instead
+(i.e. removing items from it can break other packages' dependencies)
+
+* Update pydist/sources.list file to point to your distro/suit
+* Remove pydist/dist_fallback file
+* Run `make dist_fallback`
diff --git a/debian/changelog b/debian/changelog
index 08cc322..2db242e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,8 +10,8 @@ python-defaults (2.6.6-2) UNRELEASED; urgency=low
       fall back to package name recommended by Debian Python Policy (use
       debian/pydist-override file to override)
     - TODO: disable PyDist feature if dh_pydeb is in debian/rules
-  * use /usr/bin/python rather than python in python-minimal.postinst
-    (closes: 595826)
+  * Use versioned interpreter name rather than "python" only in
+    python-minimal.postinst (closes: 595826)
 
   [ Matthias Klose ]
   * python.mk (py_libdir): Return /usr/lib/python3/dist-packages for 3.x
diff --git a/debian/python-minimal.postinst b/debian/python-minimal.postinst
deleted file mode 100644
index de5e7ff..0000000
--- a/debian/python-minimal.postinst
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-set -e
-
-/usr/bin/python -m compileall /usr/share/python/ >/dev/null
-
-#DEBHELPER#
diff --git a/debian/python-minimal.postinst.in b/debian/python-minimal.postinst.in
new file mode 100644
index 0000000..167834c
--- /dev/null
+++ b/debian/python-minimal.postinst.in
@@ -0,0 +1,6 @@
+#! /bin/sh
+set -e
+
+python@VER@ -m compileall /usr/share/python/ >/dev/null
+
+#DEBHELPER#
diff --git a/pydist/Makefile b/pydist/Makefile
index d4553bd..b24f306 100644
--- a/pydist/Makefile
+++ b/pydist/Makefile
@@ -5,10 +5,10 @@ clean:
 	#rm -f dist_fallback
 	rm -f README.PyDist.html
 
-dist_fallback:
+dist_fallback: sources.list
 	python ./generate_fallback_list.py --skip-sensible-names
 
 README.PyDist.html: README.PyDist
-	rst2html README.PyDist $@
+	rst2html $< $@
 
 .PHONY: clean
-- 
GitLab