| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
|
| 4 |
# there are no guarantees on unpack order, so when the pyshared egg |
| 5 |
# folder is extracted before the symlinks in /usr/lib/.../dist-packages |
| 6 |
# the upgrade will fail due to policy 6.6.4 when there are more than |
| 7 |
# one supported python version as it will try to overwrite a directory |
| 8 |
# after following the symlink |
| 9 |
# => remove egg symlink installed by 0.6.1-1 before unpacking |
| 10 |
if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt "0.6.1-4"; then |
| 11 |
for f in /usr/lib/python2.*; do |
| 12 |
# if egg is a link and not pointing to a directory |
| 13 |
if [ -L "$f/dist-packages/foolscap-0.6.1.egg-info" ] && |
| 14 |
[ -f "$f/dist-packages/foolscap-0.6.1.egg-info" ]; then |
| 15 |
rm -f "$f/dist-packages/foolscap-0.6.1.egg-info"; |
| 16 |
fi |
| 17 |
done |
| 18 |
fi |
| 19 |
|
| 20 |
#DEBHELPER# |