From 9e6fc028ace59912181c5ccdd4d26f28e2676e07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Fri, 31 Aug 2012 18:08:13 +0200
Subject: [PATCH] dh_python2: no longer sensitive to trailing slash in private
 dir names (closes: #686358)

---
 debian/changelog | 7 +++++++
 dh_python2       | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7ccb56e..0188628 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-defaults (2.7.3-3) UNRELEASED; urgency=low
+
+  * dh_python2: no longer sensitive to trailing slash in private dir names
+    (closes: #686358)
+
+ -- Piotr Ożarowski <piotr@debian.org>  Fri, 31 Aug 2012 18:06:26 +0200
+
 python-defaults (2.7.3-2) unstable; urgency=low
 
   * dh_python2: ignore empty files while trying to normalize shebangs
diff --git a/dh_python2 b/dh_python2
index 617d800..911f4a7 100755
--- a/dh_python2
+++ b/dh_python2
@@ -321,8 +321,9 @@ def scan(package, dname=None, options=None):
                                 'usr/share/%s', 'usr/share/games/%s')]
     else:
         # scan private directory *only*
-        proot = join('debian', package, dname.strip('/'))
-        private_to_check = [dname[1:]]
+        dname = dname.strip('/')
+        proot = join('debian', package, dname)
+        private_to_check = [dname]
 
     for root, dirs, file_names in os.walk(proot):
         # ignore Python 3.X locations
-- 
GitLab