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" ] && [ ! -d "$spool/db-h" ]; then
8 echo "Migrating bug database to hashed format." >&2
9 /usr/sbin/debbugs-dbhash "$spool/db" "$spool/db-h"
10 echo "You can remove bug logs from $spool/db" >&2
11 echo "after ensuring that the new database works." >&2
13 echo "Cannot migrate bug database to hashed format, because:" >&2
14 if [ -d "$spool/db" ]; then
15 echo "$spool/db-h already exists."
17 echo "$spool/db is missing."
19 echo "Rectify the situation and run the following command by hand:" >&2
20 echo " /usr/sbin/debbugs-dbhash \"$spool/db\" \"$spool/db-h\"" >&2
25 if [ -f /etc/debbugs/nextnumber ]; then
26 rm -f /etc/debbugs/nextnumber