tag 607988 + patch
thanks

Attached patch should fix the problem. I'm not uploading yet, because 
I want to fix preinst-pycentral-clean template as well (.pkgremove files
are not generated in Lenny's pycentral)
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
diff -Nru python-defaults-2.6.6/debian/changelog python-defaults-2.6.6/debian/changelog
--- python-defaults-2.6.6/debian/changelog	2010-12-19 21:19:39.000000000 +0100
+++ python-defaults-2.6.6/debian/changelog	2011-01-11 23:07:28.000000000 +0100
@@ -1,3 +1,11 @@
+python-defaults (2.6.6-3+squeeze5) unstable; urgency=low
+
+  * dh_python2: fix moving files from old debug locations
+  * pycompile: skip dangling symlinks to fix upgrade problem introduced in
+    -3+squeeze3 (closes: 607988)
+
+ -- Piotr Ożarowski <pi...@debian.org>  Tue, 11 Jan 2011 22:14:56 +0100
+
 python-defaults (2.6.6-3+squeeze4) unstable; urgency=medium
 
   * dh_python2: fix a crash in packages with private extension (closes: 607555)
diff -Nru python-defaults-2.6.6/dh_python2 python-defaults-2.6.6/dh_python2
--- python-defaults-2.6.6/dh_python2	2010-12-19 21:16:59.000000000 +0100
+++ python-defaults-2.6.6/dh_python2	2011-01-11 22:16:07.000000000 +0100
@@ -104,7 +104,7 @@
         dbg_to_check.append("usr/lib/debug/usr/lib/pyshared/python%s" % ver)
         dstdir = sitedir(version, package, gdb=True)
 
-        for location in to_check:
+        for location in dbg_to_check:
             srcdir = "debian/%s/%s" % (package, location)
             if isdir(srcdir):
                 if not isdir(dstdir):
diff -Nru python-defaults-2.6.6/pycompile python-defaults-2.6.6/pycompile
--- python-defaults-2.6.6/pycompile	2010-12-12 22:28:57.000000000 +0100
+++ python-defaults-2.6.6/pycompile	2011-01-11 22:54:09.000000000 +0100
@@ -29,7 +29,7 @@
 import os
 import sys
 from os import environ, listdir, walk
-from os.path import abspath, exists, isdir, isfile, join
+from os.path import abspath, exists, isdir, isfile, islink, join
 from subprocess import PIPE, STDOUT, Popen
 sys.path.insert(1, '/usr/share/python/')
 from debpython.version import SUPPORTED, debsorted, vrepr, \
@@ -191,6 +191,12 @@
 
     # byte compile files
     for fn, versions_to_compile in filter_files(files, e_patterns, versions):
+        if not exists(fn):
+            # pycentral's cleanup-pkgprepare-updates hook will clean it later
+            if islink(fn):
+                log.warn('dangling symlink skipped: %s (%s)', fn,
+                          os.readlink(fn))
+            continue
         cfn = fn + 'c' if (__debug__ or not optimize) else 'o'
         if exists(cfn) and not force:
             ftime = os.stat(fn).st_mtime

Attachment: signature.asc
Description: Digital signature



Reply via email to