]> git.donarmstrong.com Git - debbugs.git/blob - debian/postinst
merge changes from dla source branch
[debbugs.git] / debian / postinst
1 #!/bin/sh -e
2
3 if [ "$1" = "configure" ]; then
4   /usr/sbin/debbugsconfig
5   if dpkg --compare-versions "$2" lt 2.4; then
6     spool=`perl -e 'require "/etc/debbugs/config"; print $gSpoolDir;'`
7     if [ -d "$spool/db" ]; then
8       if [ -d "$spool/db-h" ]; then
9         echo "Cannot migrate bug database to hashed format, because" >&2
10         echo "$spool/db-h already exists." >&2
11         echo "Rectify the situation and run the following command by hand:" >&2
12         echo "  /usr/sbin/debbugs-dbhash \"$spool/db\" \"$spool/db-h\"" >&2
13       else
14         echo "Migrating bug database to hashed format." >&2
15         /usr/sbin/debbugs-dbhash "$spool/db" "$spool/db-h"
16         echo "You can remove bug logs from $spool/db" >&2
17         echo "after ensuring that the new database works." >&2
18       fi
19     fi
20   fi
21 fi
22
23 if [ -f /etc/debbugs/nextnumber ]; then
24   rm -f /etc/debbugs/nextnumber
25 fi
26
27 #DEBHELPER#