[Python-modules-commits] r8077 - in packages/pycairo/trunk/debian (2 files)

shlomme at users.alioth.debian.org shlomme at users.alioth.debian.org
Fri Mar 27 13:45:46 UTC 2009


    Date: Friday, March 27, 2009 @ 13:45:45
  Author: shlomme
Revision: 8077

fix broken upgrades from old python-central versions

Added:
  packages/pycairo/trunk/debian/python-cairo.preinst
Modified:
  packages/pycairo/trunk/debian/changelog

Modified: packages/pycairo/trunk/debian/changelog
===================================================================
--- packages/pycairo/trunk/debian/changelog	2009-03-27 13:29:49 UTC (rev 8076)
+++ packages/pycairo/trunk/debian/changelog	2009-03-27 13:45:45 UTC (rev 8077)
@@ -1,3 +1,11 @@
+pycairo (1.8.4-2) unstable; urgency=low
+
+  * debian/preinst
+    - Remove files remaining from python-central if
+      /var/lib/pycentral/pkgremove did not exist before (Closes: #516518)
+
+ -- Torsten Marek <shlomme at debian.org>  Fri, 27 Mar 2009 13:49:34 +0100
+
 pycairo (1.8.4-1) unstable; urgency=low
 
   * New upstream release for unstable (Closes: #497055)

Added: packages/pycairo/trunk/debian/python-cairo.preinst
===================================================================
--- packages/pycairo/trunk/debian/python-cairo.preinst	                        (rev 0)
+++ packages/pycairo/trunk/debian/python-cairo.preinst	2009-03-27 13:45:45 UTC (rev 8077)
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+PYCENTRAL=/usr/bin/pycentral
+
+case "$1" in
+    install|upgrade)
+        if dpkg --compare-versions "$2" lt 1.8.4-2; then
+            if [ -x $PYCENTRAL ]; then
+                # explicitly remove old python-central files
+                pycentral pkgremove python-cairo
+            fi
+            # be really really sure about it, in case we update
+            # from 1.8.4-1
+            for pyversion in 2.4 2.5; do
+                if [ -d /usr/lib/python$pyversion/site-packages/cairo/ ]; then
+                    rm -f /usr/lib/python$pyversion/site-packages/cairo/__init__.py*
+                    rmdir --ignore-fail-on-non-empty /usr/lib/python$pyversion/site-packages/cairo
+                fi
+            done
+        fi
+    ;;
+    *)
+    ;;
+esac




More information about the Python-modules-commits mailing list