This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.

commit dc71d93beb5aea42bca05287d107117c634b2707
Author: Piotr Ożarowski <pi...@debian.org>
Date:   Tue Nov 5 23:16:56 2013 +0100

    pyremove: remove files from old site-dirs
    
    in case files were not moved yet (will be useful for Python 3 packages)
---
 dhpython/tools.py | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/dhpython/tools.py b/dhpython/tools.py
index 1a48acb..e2f944b 100644
--- a/dhpython/tools.py
+++ b/dhpython/tools.py
@@ -298,16 +298,15 @@ def pyremove(interpreter, package, vrange):
             log.debug('%s.pyremove: no matching versions for line %s',
                       package, line)
         for version in myvers:
-            files = glob(interpreter.sitedir(package, version) + 
details['pattern'])
-            if not files:
-                log.debug('%s.pyremove: nothing to remove: python%s, %s',
-                          package, version, details['pattern'])
-                continue
-            for fpath in files:
-                if isdir(fpath):
-                    rmtree(fpath)
-                else:
-                    os.remove(fpath)
+            site_dirs = interpreter.old_sitedirs(package, version)
+            site_dirs.append(interpreter.sitedir(package, version))
+            for sdir in site_dirs:
+                files = glob(sdir + details['pattern'])
+                for fpath in files:
+                    if isdir(fpath):
+                        rmtree(fpath)
+                    else:
+                        os.remove(fpath)
 
 from dhpython.interpreter import Interpreter
 from dhpython.version import Version, get_requested_versions, RANGE_PATTERN

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/reproducible/dh-python.git

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to