package python-qt-dev
tags 562948 patch
thanks
Hello,
An attached patch adds to preinst file fallback code if pycentral not found
(which was in lenny's python-qt-dev prerm generated by dh_pycentral), and to
control file missing Depends.
Regards,
--
YOSHINO Yoshihito <[email protected]>
diff -urN python-qt3-3.18.1/debian/control python-qt3-3.18.1.new/debian/control
--- python-qt3-3.18.1/debian/control 2010-01-23 16:28:21.000000000 +0900
+++ python-qt3-3.18.1.new/debian/control 2010-01-23 16:25:24.000000000 +0900
@@ -92,6 +92,7 @@
Linguist translation files from Python code.
Package: python-qt-dev
+Depends: ${shlibs:Depends}, ${python:Depends}
Suggests: sip4
Replaces: python-qt3 (<< 3.17.3-2)
Architecture: all
diff -urN python-qt3-3.18.1/debian/python-qt-dev.preinst python-qt3-3.18.1.new/debian/python-qt-dev.preinst
--- python-qt3-3.18.1/debian/python-qt-dev.preinst 2010-01-23 16:28:21.000000000 +0900
+++ python-qt3-3.18.1.new/debian/python-qt-dev.preinst 2010-01-23 16:25:07.000000000 +0900
@@ -4,7 +4,30 @@
if [ "$1" = upgrade ]
then
if dpkg --compare-versions "$2" lt 3.17.6-2; then
+ if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
pycentral pkgremove python-qt-dev
+ else
+ flist=$(tempfile)
+ find /usr/share/pycentral/python-qt-dev -depth -mindepth 2 \
+ \( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \
+ > $flist 2>/dev/null || true
+ if [ -s $flist ]; then
+ for d in /usr/lib/python[0-9].[0-9]; do
+ case "$d" in */python2.1|*/python2.2) continue; esac
+ while read t n; do
+ case "$t" in
+ p) rm -f $d/$n $d/${n}[co];;
+ d) rmdir $d/$n 2>/dev/null || true;;
+ *) rm -f $d/$n
+ esac
+ done < $flist
+ done
+ fi
+ rm -f $flist
+ dpkg -L python-qt-dev \
+ | awk '/\/usr\/share\/pycentral/ {next} /\.py$/ {print $0"c\n" $0"o"}' \
+ | xargs rm -f >&2
+ fi
fi
fi
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/python-modules-team