~ubuntu-branches/ubuntu/hardy/python-gnuplot/hardy

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-10-29 02:45:58 UTC
  • mfrom: (2.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20061029024558-l8cl3gdh0002ych1
Tags: 1.7-7
Fix unhandled exception (Michael Schieschke). Closes: #353642.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/bash -e
2
 
#
3
 
# Debian prerm script for Python x.y hierarchical modules
4
 
# Written by Gregor Hoffleit <flight@debian.org>
5
 
# Extended by Matthias Klose <doko@debian.org>
6
 
#
7
 
 
8
 
PACKAGE=`basename $0 | sed -e 's/\.[^.]*$//'`
9
 
PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{
10
 
  s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p
11
 
  q
12
 
}'`
13
 
DIRLIST="/usr/lib/python$PV/site-packages"
14
 
 
15
 
case "$1" in
16
 
    configure|abort-upgrade|abort-remove|abort-deconfigure)
17
 
        for i in $DIRLIST ; do
18
 
            /usr/bin/python -W ignore::SyntaxWarning:: -O \
19
 
                /usr/lib/python$PV/compileall.py -q $i
20
 
            /usr/bin/python -W ignore::SyntaxWarning:: \
21
 
                /usr/lib/python$PV/compileall.py -q $i
22
 
        done
23
 
    ;;
24
 
 
25
 
    *)
26
 
        echo "postinst called with unknown argument \`$1'" >&2
27
 
        exit 1
28
 
    ;;
29
 
esac
30
 
 
31
 
#DEBHELPER#