[Python-modules-commits] r17133 - in packages/foolscap/trunk/debian (changelog preinst)
jtaylor-guest at users.alioth.debian.org
jtaylor-guest at users.alioth.debian.org
Tue May 24 14:18:43 UTC 2011
Date: Tuesday, May 24, 2011 @ 14:18:42
Author: jtaylor-guest
Revision: 17133
add preinst to remove egg symlinks installed by 0.6.1-1
there are no guarantees on unpack order, so when the pyshared egg
folder is extracted before the symlinks in /usr/lib/.../dist-packages
the upgrade will fail due to policy 6.6.4 when there are more than
one supported python version as it will try to overwrite a directory
after following the symlink
=> remove egg symlink installed by 0.6.1-1 before unpacking
Added:
packages/foolscap/trunk/debian/preinst
Modified:
packages/foolscap/trunk/debian/changelog
Modified: packages/foolscap/trunk/debian/changelog
===================================================================
--- packages/foolscap/trunk/debian/changelog 2011-05-24 12:40:02 UTC (rev 17132)
+++ packages/foolscap/trunk/debian/changelog 2011-05-24 14:18:42 UTC (rev 17133)
@@ -4,6 +4,7 @@
- needed for testsuite, was indirect over twisted-core before
* add pydist-override: twisted -> python-twisted-core
* remove recommend of python-twisted-names, not needed
+ * fix upgrade from 0.6.1-1 by using preinst to remove the old egg symlink
-- Julian Taylor <jtaylor.debian at googlemail.com> Fri, 20 May 2011 16:26:59 +0200
Added: packages/foolscap/trunk/debian/preinst
===================================================================
--- packages/foolscap/trunk/debian/preinst (rev 0)
+++ packages/foolscap/trunk/debian/preinst 2011-05-24 14:18:42 UTC (rev 17133)
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+# there are no guarantees on unpack order, so when the pyshared egg
+# folder is extracted before the symlinks in /usr/lib/.../dist-packages
+# the upgrade will fail due to policy 6.6.4 when there are more than
+# one supported python version as it will try to overwrite a directory
+# after following the symlink
+# => remove egg symlink installed by 0.6.1-1 before unpacking
+if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt "0.6.1-4"; then
+ for f in /usr/lib/python2.*; do
+ # if egg is a link and not pointing to a directory
+ if [ -L "$f/dist-packages/foolscap-0.6.1.egg-info" ] &&
+ [ -f "$f/dist-packages/foolscap-0.6.1.egg-info" ]; then
+ rm -f "$f/dist-packages/foolscap-0.6.1.egg-info";
+ fi
+ done
+fi
+
+#DEBHELPER#
More information about the Python-modules-commits
mailing list