File: postinst

package info (click to toggle)
debbugs 2.4.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge, squeeze, wheezy
  • size: 620 kB
  • ctags: 290
  • sloc: perl: 6,067; sh: 176; makefile: 63
file content (27 lines) | stat: -rwxr-xr-x 898 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
#!/bin/sh -e

if [ "$1" = "configure" ]; then
  /usr/sbin/debbugsconfig
  if dpkg --compare-versions "$2" lt 2.4; then
    spool=`perl -e 'require "/etc/debbugs/config"; print $gSpoolDir;'`
    if [ -d "$spool/db" ]; then
      if [ -d "$spool/db-h" ]; then
        echo "Cannot migrate bug database to hashed format, because" >&2
        echo "$spool/db-h already exists." >&2
        echo "Rectify the situation and run the following command by hand:" >&2
        echo "  /usr/sbin/debbugs-dbhash \"$spool/db\" \"$spool/db-h\"" >&2
      else
        echo "Migrating bug database to hashed format." >&2
        /usr/sbin/debbugs-dbhash "$spool/db" "$spool/db-h"
        echo "You can remove bug logs from $spool/db" >&2
        echo "after ensuring that the new database works." >&2
      fi
    fi
  fi
fi

if [ -f /etc/debbugs/nextnumber ]; then
  rm -f /etc/debbugs/nextnumber
fi

#DEBHELPER#