1.1 --- a/debian/shedskin.prerm.debhelper Mon Jan 11 01:48:42 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,45 +0,0 @@
1.4 -# Automatically added by dh_pycentral
1.5 -case "$1" in remove|upgrade)
1.6 - pkgremove=y
1.7 -esac
1.8 -if [ -f /var/lib/pycentral/shedskin.pkgremove ] || [ -f /var/lib/pycentral/pkgremove ]; then
1.9 - pkgremove=y
1.10 -fi
1.11 -if [ "$pkgremove" = y ]; then
1.12 -if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then
1.13 - pycentral pkgremove shedskin
1.14 -else
1.15 - flist=$(tempfile)
1.16 - slist=$(tempfile)
1.17 - dpkg -L shedskin | tee $flist | \
1.18 - while read n; do
1.19 - case "$n" in
1.20 - /usr/share/pyshared/*)
1.21 - n2=${n#/usr/share/pyshared/*}
1.22 - case "$n" in
1.23 - *.py) echo "p $n";;
1.24 - *) [ -d "$n" ] && echo "d $n2" || echo "f $n2"
1.25 - esac
1.26 - ;;
1.27 - *) continue
1.28 - esac
1.29 - done > $slist
1.30 - if [ -s $slist ]; then
1.31 - for d in /usr/lib/python[0-9].[0-9]/????-packages; do
1.32 - case "$d" in */python2.1/*|*/python2.2/*) continue; esac
1.33 - while read t n; do
1.34 - case "$t" in
1.35 - p) rm -f $d/$n $d/${n}[co];;
1.36 - d) rmdir $d/$n 2>/dev/null || true;;
1.37 - *) rm -f $d/$n
1.38 - esac
1.39 - done < $slist
1.40 - done
1.41 - fi
1.42 - awk '/\/usr\/share\/pyshared/ {next} /\.py$/ {print $0"c\n" $0"o"}' $flist \
1.43 - | xargs -r rm -f >&2
1.44 - rm -f $flist $slist
1.45 -fi
1.46 -rm -f /var/lib/pycentral/shedskin.pkgremove
1.47 -fi
1.48 -# End automatically added section