[Python-modules-commits] r14953 - in packages/gamera/trunk/debian (4 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Mon Nov 22 16:16:53 UTC 2010


    Date: Monday, November 22, 2010 @ 16:16:48
  Author: jwilk
Revision: 14953

Remove /usr/include/python2.X/gamera in preinst; otherwise dpkg wouldn't replace directories with symlinks or vice-versa.
Make all /usr/include/python2.X/gamera symlinks to /usr/include/gamera, so that the preinst script could be dropped post-Squeeze.

Added:
  packages/gamera/trunk/debian/python-gamera-dev.postrm
  packages/gamera/trunk/debian/python-gamera-dev.preinst
Modified:
  packages/gamera/trunk/debian/changelog
  packages/gamera/trunk/debian/rules

Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog	2010-11-21 23:36:08 UTC (rev 14952)
+++ packages/gamera/trunk/debian/changelog	2010-11-22 16:16:48 UTC (rev 14953)
@@ -1,3 +1,12 @@
+gamera (3.2.6-3) UNRELEASED; urgency=low
+
+  * Remove /usr/include/python2.X/gamera in preinst; otherwise dpkg wouldn't
+    replace directories with symlinks or vice-versa (closes: #603602).
+  * Make all /usr/include/python2.X/gamera symlinks to /usr/include/gamera, so
+    that the preinst script could be dropped post-Squeeze.
+
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 20 Nov 2010 17:03:45 +0100
+
 gamera (3.2.6-2) unstable; urgency=low
 
   * Bump standards version to 3.9.1 (no changes needed).

Added: packages/gamera/trunk/debian/python-gamera-dev.postrm
===================================================================
--- packages/gamera/trunk/debian/python-gamera-dev.postrm	                        (rev 0)
+++ packages/gamera/trunk/debian/python-gamera-dev.postrm	2010-11-22 16:16:48 UTC (rev 14953)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# TODO: remove this snippet after Squeeze release
+
+if [ "$1" = "abort-upgrade" ]
+then
+    # preinst upgrade has just failed; it might have removed some important
+    # files, so leave the package in the Half-Installed state.
+    exit 1
+fi
+
+#DEBHELPER#

Added: packages/gamera/trunk/debian/python-gamera-dev.preinst
===================================================================
--- packages/gamera/trunk/debian/python-gamera-dev.preinst	                        (rev 0)
+++ packages/gamera/trunk/debian/python-gamera-dev.preinst	2010-11-22 16:16:48 UTC (rev 14953)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# TODO: remove this snippet after Squeeze release
+
+if [ "$1" = "upgrade" ]
+then
+    # See bug #603602
+    rm -Rf /usr/include/python2.*/gamera    
+fi
+
+#DEBHELPER#

Modified: packages/gamera/trunk/debian/rules
===================================================================
--- packages/gamera/trunk/debian/rules	2010-11-21 23:36:08 UTC (rev 14952)
+++ packages/gamera/trunk/debian/rules	2010-11-22 16:16:48 UTC (rev 14953)
@@ -59,15 +59,15 @@
 	find debian/gamera-gui/ -name has_gui.py -delete
 	pngtopnm < gamera/pixmaps/icon.png | ppmtoxpm > debian/gamera-gui/usr/share/pixmaps/gamera-gui.xpm
 	dh install -i --before dh_link
-	for version in $(shell pyversions -r); do \
-	for suffix in "" _d; do \
-	if [ $$version$$suffix != $(shell pyversions -d) ]; then \
-		dir=debian/python-gamera-dev/usr/include/$$version$$suffix/gamera; \
-		rm -Rf $$dir; \
-		ln -sf ../$(shell pyversions -d)/gamera $$dir; \
-	fi \
-	done; \
-	done
+	set -e; cd debian/python-gamera-dev/usr/include/; \
+		mv $(shell pyversions -d)/gamera .; \
+		rm -Rf python2.*/; \
+		for version in $(shell pyversions -r); do \
+		for suffix in "" _d; do \
+			mkdir -p $$version$$suffix; \
+			ln -sf ../gamera $$version$$suffix/gamera; \
+		done; \
+		done
 	dh install -i --remaining
 	sed -i -e '1 s|.*|#!/usr/bin/python|' debian/gamera-gui/usr/bin/gamera_gui
 




More information about the Python-modules-commits mailing list