File: python-pyx.preinst

package info (click to toggle)
pyx 0.11.1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,468 kB
  • sloc: python: 18,575; ansic: 99; makefile: 91; sh: 9
file content (32 lines) | stat: -rw-r--r-- 1,225 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

set -e

# TODO: remove this file after releasing Squeeze or python-central is fixed (see #479852)

# python-pyx versions 0.9-4 to 0.10-0nmu1 used python-central
# python-pyx versions 0.10-0nmu2 and 0.10-0nmu3 use python-support but did
#  not guarantee to make pycentral clean up after itself
# python-pyx versions 0.10-1 uses python-support and has this preinst to 
#  clean up pycentral files.
#
# For lenny->squeeze this script will be enough. For people upgrading
# the 0.10 packages that were in sid but without this script, if python-central
# is still installed (most likely!) then this script will clean things up and
# all is well. For a small number of people who installed the 0.10 packages
# without this package and (auto-)removed python-central, then there is some
# manual clean-up required.

if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt "0.10-1"
then
  if [ -x /usr/bin/pycentral ]
  then
    pycentral pkgremove python-pyx
  fi
  # if python-central is around then this should do nothing; if python-central
  # has been removed (perhaps auto-removed) when upgrading from 0.10-0nmu{2,3}
  # then force the clean-up anyway.
  rm -rf /usr/lib/python2.?/site-packages/pyx/
fi

#DEBHELPER#