From: cjwatson <> Date: Wed, 28 May 2003 06:49:20 +0000 (-0800) Subject: [project @ 2003-05-27 23:49:20 by cjwatson] X-Git-Tag: release/2.6.0~881 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=beef481dd594abf363296d2580f19c33541219e6;p=debbugs.git [project @ 2003-05-27 23:49:20 by cjwatson] Silence postinst warning if spool/db doesn't exist (#194892). --- diff --git a/debian/changelog b/debian/changelog index e8086668..431b118d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ debbugs (2.4.1) UNRELEASED; urgency=low interface (unless the "mime=no" parameter is used), closes: #136114. - Add facility to search by tag. - Fix rebuild script and add it to the example crontab, closes: #139696. + - Silence postinst warning if spool/db doesn't exist, closes: #194892. * Adam Heath: - Convert all code to use global read/write functions, instead of having it duplicated everwhere. diff --git a/debian/postinst b/debian/postinst index 5a8a3878..4b76f38a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,20 +4,18 @@ 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" ] && [ ! -d "$spool/db-h" ]; then - 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 - else - echo "Cannot migrate bug database to hashed format, because:" >&2 - if [ -d "$spool/db" ]; then - echo "$spool/db-h already exists." + 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 "$spool/db is missing." + 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 - echo "Rectify the situation and run the following command by hand:" >&2 - echo " /usr/sbin/debbugs-dbhash \"$spool/db\" \"$spool/db-h\"" >&2 fi fi fi