From 52e56f9f818585a6115b59ec1fc2905afc67defd Mon Sep 17 00:00:00 2001
From: Scott Kitterman <kitterma@dell-desktop>
Date: Sun, 27 Jun 2010 15:02:43 -0400
Subject: [PATCH]   [ Scott Kitterman ]   * Merge changes back from Ubuntu
 package:     - Tighten  depends relationships to '='     - python: Add an
 unversioned 2to3' binary (Change pending in Debian)     - python-minimal:
 Provide symlink to binary and manpage for       /usr/bin/python2 (Closes:
 #566266)

modified:
  debian/changelog
  debian/control
  debian/rules
---
 debian/changelog | 10 +++++++++-
 debian/control   | 18 +++++++++---------
 debian/rules     |  4 ++++
 3 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 090f982..120d92f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,18 @@
 python-defaults (2.6.5-6) UNRELEASED; urgency=low
 
+  [ Piotr Ożarowski ]
   * dh_python2:
     - invoke `pycentral pkgremove foo` in preinst if upgrading from
       python-central based package
 
- -- Piotr Ożarowski <piotr@debian.org>  Sun, 27 Jun 2010 13:20:01 +0200
+  [ Scott Kitterman ]
+  * Merge changes back from Ubuntu package:
+    - Tighten ${binary:Version} depends relationships to "="
+    - python: Add an unversioned `2to3' binary (Change pending in Debian)
+    - python-minimal: Provide symlink to binary and manpage for
+      /usr/bin/python2 (Closes: #566266)
+
+ -- Scott Kitterman <scott@kitterman.com>  Sun, 27 Jun 2010 14:53:31 -0400
 
 python-defaults (2.6.5-5) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 585183e..53593c3 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Vcs-Browser: http://alioth.debian.org/scm/loggerhead/pkg-python/python-defaults-
 Package: python
 Architecture: all
 Priority: standard
-Depends: ${misc:Depends}, python2.6 (>= 2.6.5+20100616-1~), python-minimal (>= ${binary:Version})
+Depends: ${misc:Depends}, python2.6 (>= 2.6.5+20100616-1~), python-minimal (= ${binary:Version})
 Conflicts: python2.3 (<< 2.3.5-14), python2.1 (<= 2.1.2), python-xmlbase, python-csv, python-bz2, python-base, python-central (<< 0.5.5)
 Replaces: python2.3 (<= 2.3.2-6), python-xmlbase, python-base, python-dev (<< 2.6.5-2)
 Provides: python-email, python-xmlbase, python-plistlib, python-ctypes, python-wsgiref
@@ -41,7 +41,7 @@ Description: A minimal subset of the Python language (default version)
 
 Package: python-examples
 Architecture: all
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python2.6-examples (>= 2.6.5+20100616-1~)
+Depends: ${misc:Depends}, python (= ${binary:Version}), python2.6-examples (>= 2.6.5+20100616-1~)
 Description: Examples for the Python language (default version)
  Examples, Demos and Tools for Python. These are files included in
  the upstream Python distribution.
@@ -51,7 +51,7 @@ Description: Examples for the Python language (default version)
 
 Package: python-dev
 Architecture: all
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python2.6-dev (>= 2.6.5+20100616-1~)
+Depends: ${misc:Depends}, python (= ${binary:Version}), python2.6-dev (>= 2.6.5+20100616-1~)
 Description: Header files and a static library for Python (default)
  Header files, a static library and development tools for building
  Python modules, extending the Python interpreter or embedding Python
@@ -65,7 +65,7 @@ Description: Header files and a static library for Python (default)
 
 Package: idle
 Architecture: all
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python-tk (>= 2.4.3-3), idle-python2.6
+Depends: ${misc:Depends}, python (= ${binary:Version}), python-tk (>= 2.4.3-3), idle-python2.6
 Enhances: python
 Description: An IDE for Python using Tkinter (default version)
  IDLE is an Integrated Development Environment for Python.
@@ -78,7 +78,7 @@ Package: python-doc
 Section: doc
 Architecture: all
 Depends: ${misc:Depends}, python2.6-doc (>= 2.6.5+20100616-1~)
-Suggests: python (>= ${binary:Version})
+Suggests: python (= ${binary:Version})
 Conflicts: python-doc-info, python (<< 2.3.5)
 Replaces: python-doc-info, python (<< 2.3.5)
 Description: Documentation for the high-level object-oriented language Python
@@ -103,7 +103,7 @@ Package: python-dbg
 Architecture: all
 Section: debug
 Priority: extra
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python2.6-dbg (>= 2.6.5+20100616-1~)
+Depends: ${misc:Depends}, python (= ${binary:Version}), python2.6-dbg (>= 2.6.5+20100616-1~)
 Provides: python-gdbm-dbg, python-tk-dbg
 Description: Debug Build of the Python Interpreter (version 2.6)
  Python interpreter configured with --pydebug. Dynamically loaded modules are
@@ -112,7 +112,7 @@ Description: Debug Build of the Python Interpreter (version 2.6)
 Package: python-all
 Architecture: all
 Priority: optional
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python2.5 (>= 2.5.5-6), python2.6 (>= 2.6.5-2)
+Depends: ${misc:Depends}, python (= ${binary:Version}), python2.5 (>= 2.5.5-6), python2.6 (>= 2.6.5-2)
 Description: Package depending on all supported Python runtime versions
  The package currently depends on python2.5 and python2.6, in the future,
  dependencies on jython (Python for a JVM) and ironpython (Python for Mono)
@@ -124,7 +124,7 @@ Description: Package depending on all supported Python runtime versions
 Package: python-all-dev
 Architecture: all
 Priority: optional
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python-all (>= ${binary:Version}), python-dev (>= ${binary:Version}), python2.5-dev (>= 2.5.5-6), python2.6-dev (>= 2.6.5-2)
+Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dev (= ${binary:Version}), python2.5-dev (>= 2.5.5-6), python2.6-dev (>= 2.6.5-2)
 Description: Package depending on all supported Python development packages
  The package currently depends on python2.5-dev and python2.6-dev, in the
  future, dependencies on jython (Python for a JVM) and ironpython (Python
@@ -137,7 +137,7 @@ Package: python-all-dbg
 Architecture: all
 Section: debug
 Priority: extra
-Depends: ${misc:Depends}, python (>= ${binary:Version}), python-all (>= ${binary:Version}), python-dbg (>= ${binary:Version}), python2.5-dbg (>= 2.5.5-6), python2.6-dbg (>= 2.6.5-2)
+Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dbg (= ${binary:Version}), python2.5-dbg (>= 2.5.5-6), python2.6-dbg (>= 2.6.5-2)
 Description: Package depending on all supported Python debugging packages
  The package currently depends on python2.5-dbg and python2.6-dbg, in the
  future, dependencies on jython (Python for a JVM) and ironpython (Python
diff --git a/debian/rules b/debian/rules
index 0065499..37d248f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -158,6 +158,9 @@ binary-indep: build install stamp-doc
 	ln -sf python$(VER).1.gz \
 		debian/python-minimal/usr/share/man/man1/python.1.gz
 
+	ln -sf python$(VER) debian/python-minimal/usr/bin/python2
+	ln -sf python$(VER).1.gz \
+		debian/python-minimal/usr/share/man/man1/python2.1.gz
 	: # 
 	mkdir -p debian/python-minimal/usr/share/python
 	cp -p debian/debian_defaults \
@@ -181,6 +184,7 @@ binary-indep: build install stamp-doc
 	ln -sf pydoc$(VER) debian/python/usr/bin/pydoc
 	ln -sf pygettext$(VER) debian/python/usr/bin/pygettext
 	ln -sf pdb$(VER) debian/python/usr/bin/pdb
+	ln -sf 2to3-$(VER) debian/python/usr/bin/2to3
 
 	mkdir -p debian/python/usr/share/python
 	install -m 644 debian/python.mk \
-- 
GitLab