diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-03-28 14:13:18 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-03-28 14:13:18 -0500 |
commit | 4bc22e8b188aa26df8b1a23c39bb0f3c5b05b8b6 (patch) | |
tree | c6f53decaabed9678523a8bbd6a1000a9f3bf78f /ubuntu/raring/dependencies/python-tqt/debian/python-tqt-dev.preinst | |
parent | 211d261d7778de1d9a773e7ec43a4e97b4bd7e57 (diff) | |
download | tde-packaging-4bc22e8b188aa26df8b1a23c39bb0f3c5b05b8b6.tar.gz tde-packaging-4bc22e8b188aa26df8b1a23c39bb0f3c5b05b8b6.zip |
Split raring packaging into new directory due to defoma changes
Diffstat (limited to 'ubuntu/raring/dependencies/python-tqt/debian/python-tqt-dev.preinst')
-rw-r--r-- | ubuntu/raring/dependencies/python-tqt/debian/python-tqt-dev.preinst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ubuntu/raring/dependencies/python-tqt/debian/python-tqt-dev.preinst b/ubuntu/raring/dependencies/python-tqt/debian/python-tqt-dev.preinst new file mode 100644 index 000000000..b17b35a44 --- /dev/null +++ b/ubuntu/raring/dependencies/python-tqt/debian/python-tqt-dev.preinst @@ -0,0 +1,35 @@ +#!/bin/sh +# TODO: remove this file after releasing Squeeze +set -e +if [ "$1" = upgrade ] +then + if dpkg --compare-versions "$2" lt 3.17.6-2; then + if which python >/dev/null 2>&1 && which pycentral >/dev/null 2>&1; then + pycentral pkgremove python-qt-dev + else + flist=$(tempfile) + find /usr/share/pycentral/python-qt-dev -depth -mindepth 2 \ + \( -name '*.py' -printf 'p %P\n' -o -printf '%y %P\n' \) \ + > $flist 2>/dev/null || true + if [ -s $flist ]; then + for d in /usr/lib/python[0-9].[0-9]; do + case "$d" in */python2.1|*/python2.2) continue; esac + while read t n; do + case "$t" in + p) rm -f $d/$n $d/${n}[co];; + d) rmdir $d/$n 2>/dev/null || true;; + *) rm -f $d/$n + esac + done < $flist + done + fi + rm -f $flist + dpkg -L python-qt-dev \ + | awk '/\/usr\/share\/pycentral/ {next} /\.py$/ {print $0"c\n" $0"o"}' \ + | xargs rm -f >&2 + fi + fi +fi + +#DEBHELPER# + |