From 4749a2f999bf439bd0103db7b2de50a879aba4cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Fri, 18 Jun 2010 10:26:42 +0200
Subject: [PATCH] Remove '-V' option from pyclean call in
 runtime.d/public_modules.rtremove

---
 debian/changelog                  |  4 ++--
 dh_python2                        | 13 ++++++++-----
 runtime.d/public_modules.rtremove |  2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bfe1013..e705513 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
 python-defaults (2.6.5-3) UNRELEASED; urgency=low
 
-  * 
+  * Remove '-V' option from pyclean call in runtime.d/public_modules.rtremove
 
- -- Matthias Klose <doko@debian.org>  Fri, 18 Jun 2010 00:07:51 +0200
+ -- Piotr Ożarowski <piotr@debian.org>  Fri, 18 Jun 2010 10:25:59 +0200
 
 python-defaults (2.6.5-2) unstable; urgency=low
 
diff --git a/dh_python2 b/dh_python2
index 857bdf3..3a3e6ad 100755
--- a/dh_python2
+++ b/dh_python2
@@ -594,11 +594,14 @@ def main():
             dh.autoscript(package, 'postinst', 'postinst-pycompile', args)
 
         pydist_file = join('debian', "%s.pydist" % package)
-        if exists(pydist_file) and validate_pydist(pydist_file, True):
-            dstdir = join('debian', package, 'usr/share/python/dist/')
-            if not exists(dstdir):
-                os.makedirs(dstdir)
-            fcopy(pydist_file, join(dstdir, package))
+        if exists(pydist_file):
+            if not validate_pydist(pydist_file, True):
+                log.warning("%s.pydist file is invalid", package)
+            else:
+                dstdir = join('debian', package, 'usr/share/python/dist/')
+                if not exists(dstdir):
+                    os.makedirs(dstdir)
+                fcopy(pydist_file, join(dstdir, package))
 
     dh.save()
 
diff --git a/runtime.d/public_modules.rtremove b/runtime.d/public_modules.rtremove
index 94569a4..87b5a43 100755
--- a/runtime.d/public_modules.rtremove
+++ b/runtime.d/public_modules.rtremove
@@ -2,7 +2,7 @@
 
 VERSION=${2#python}
 if which python >/dev/null 2>&1 && which pyclean >/dev/null 2>&1; then
-	pyclean -V $VERSION /usr/lib/python$VERSION/
+	pyclean /usr/lib/python$VERSION/
 else
 	find /usr/lib/python$VERSION/ -name '*.py[co]' -delete
 fi
-- 
GitLab