~ubuntu-branches/ubuntu/maverick/bpython/maverick

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Michael Bienia
  • Date: 2009-12-30 23:32:16 UTC
  • mfrom: (9.1.4 bpython.merge)
  • Revision ID: geser@ubuntu.com-20091230233216-9owfkj6h535d8zu9
Tags: 0.9.5.2-2ubuntu1
[ Charlie Smotherman ]
* Merge from debian testing, remaining changes: (LP: #501481)
   - Bumped XS-Python-Version to 2.6 so package builds correctly.
   - Bumped debhelper to (7.0.50) since dh --with quilt is being used in
      debian/rules.
* Delete stale .pyc files also for other python versions in postinst and
  prerm.
[ Michael Bienia ]
* debian/postinst: check if $2 got supplied before passing it to dpkg
  --compare-versions (avoids error message on fresh installs).
[ David Paleino ]
* debian/control:
  - updated my email address
  - DMUA removed
  - add quilt Build-Dependency
  - add python-support Build-Dependency
* debian/patches/:
  - 01-add_write_to_FakeStdin.patch added (Closes: #558054)
  - 02-add_flush_to_FakeStdin.patch added
* debian/rules, add --with quilt
* debian/postinst, debian/postrm added, correctly handle removal of
  .pyc files after the move to /usr/share/pyshared

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# postinst script for bpython
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <postinst> `configure' <most-recently-configured-version>
 
10
#        * <old-postinst> `abort-upgrade' <new version>
 
11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
12
#          <new-version>
 
13
#        * <postinst> `abort-remove'
 
14
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
15
#          <failed-install-package> <version> `removing'
 
16
#          <conflicting-package> <version>
 
17
# for details, see http://www.debian.org/doc/debian-policy/ or
 
18
# the debian-policy package
 
19
 
 
20
 
 
21
case "$1" in
 
22
    configure)
 
23
        # This is needed for upgrades from < 0.9.5.2-2, since we're being
 
24
        # installed in /usr/share/pyshared/ with python-support > 0.90.0
 
25
        [ -n "$2" ] && dpkg --compare-versions $2 lt 0.9.5.2-2 && \
 
26
            rm -rf /usr/share/python*/*-packages/bpython && \
 
27
            rm -rf /usr/lib/python*/*-packages/bpython
 
28
    ;;
 
29
 
 
30
    abort-upgrade|abort-remove|abort-deconfigure)
 
31
    ;;
 
32
 
 
33
    *)
 
34
        echo "postinst called with unknown argument \`$1'" >&2
 
35
        exit 1
 
36
    ;;
 
37
esac
 
38
 
 
39
# dh_installdeb will replace this with shell code automatically
 
40
# generated by other debhelper scripts.
 
41
 
 
42
#DEBHELPER#
 
43
 
 
44
exit 0