Your message dated Fri, 12 Jan 2007 13:32:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#372144: fixed in dictd 1.10.2-3.1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: dict
Version: 1.10.2-3
Severity: important
Tags: patch
# (Untested)

The preinstall script attempts to migrate /etc/dict.conf to
/etc/dict/, but it misses the case where a sufficiently old version of
dict is removed, and then a sufficiently new version is installed.  In
that case, preinst is called with "install" "OldVersion" arguments.

You could also drop this code for etch, but that won't support
removing dict in potato, updating to sarge, then etch, and installing
dict again. :)

This parg uses rm -f instead of a shell test, and cuts some bogus
arguments out of the case:

--- /var/lib/dpkg/info/dict.postinst    2005-12-03 11:58:45.000000000 -0500
+++ /tmp/dict.postinst  2006-06-05 19:39:59.000000000 -0400
@@ -1,23 +1,17 @@
 #! /bin/sh
-
 set -e
 
-PACKAGE=dict
-
 case "$1" in 
-     configure)
-     if [ -e /etc/dict.conf.moved_by_preinst ]; then 
-        rm /etc/dict.conf.moved_by_preinst;
-     fi
-     exit 0
-     ;;
+configure)
+       rm -f /etc/dict.conf.moved_by_preinst;
+       ;;
 
-    
failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
-        exit 0;
-    ;;
+abort-upgrade|abort-remove|abort-deconfigure)
+       # No prerm script, so no need to roll back
+       ;;
 
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2;
-        exit 0;
-    ;;
+*)
+       echo "postinst called with unknown argument \`$1'" >&2;
+       exit 1;
+       ;;
 esac

This part fixes spaces in the filename, uses the posix && operator,
treats "failed-upgrade" like "upgrade", drops support for bogus
argument "failed-install", and errors on invalid arguments, 

--- /var/lib/dpkg/info/dict.postrm      2005-12-03 11:58:45.000000000 -0500
+++ /tmp/dict.postrm    2006-06-05 20:05:01.000000000 -0400
@@ -1,28 +1,25 @@
 #! /bin/sh
-
 set -e
 
-cleanup () {
-  if [ -e /etc/dict.conf.moved_by_preinst -a -d /etc/dictd ]; then 
-    if [ -e /etc/dictd/dict.conf ]; then
-       mv /etc/dictd/dict.conf /etc/dict.conf
-    fi
-    rmdir /etc/dictd/
-    rm /etc/dict.conf.moved by preinst
-  fi
+cleanup ()
+{
+       [ ! -e /etc/dict.conf.moved_by_preinst ] || return;
+       [ -e /etc/dictd/dict.conf ] && mv /etc/dictd/dict.conf /etc/
+       [ -e /etc/dictd ] && rmdir /etc/dictd;
+       rm /etc/dict.conf.moved_by_preinst
 }
 
 case "$1" in
-   failed-install|abort-install|abort-upgrade|failed-upgrade)
-        cleanup
-        exit 0
-    ;;
+abort-install|abort-upgrade)
+       # Undo the effects of preinst install/upgrade.
+       cleanup
+       ;;
+
+remove|purge|upgrade|failed-upgrade|disappear)
+       ;;
 
-    remove|purge|upgrade|disappear)
-        exit 0
-    ;;
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
+*)
+       echo "postrm called with unknown argument \`$1'" >&2
+       exit 1
+       ;;
 esac

And this part drops support for bogus arguments, errors on invalid
arguments, supports upgrading from Config-files state, refuses to
overwrite existing files in /etc/dictd/, makes idempotent by moving
conditionally, before touching.

--- /var/lib/dpkg/info/dict.preinst     2005-12-03 11:58:45.000000000 -0500
+++ /tmp/dict.preinst   2006-06-05 20:23:28.000000000 -0400
@@ -1,30 +1,28 @@
 #! /bin/sh 
-
 set -e
 
-case "$1" in
-    upgrade)
-
-# /etc/dict.conf moved to /etc/dictd/dict.conf in 1.9.11
-    if dpkg --compare-versions "$2" lt "1.9.11"; then
-       if [ -e /etc/dict.conf ]; then
-         echo "Moving dict.conf from /etc to /etc/dictd."
-         mkdir -p /etc/dictd
-         mv /etc/dict.conf /etc/dictd/dict.conf
-         touch /etc/dict.conf.moved_by_preinst
-       fi
-     fi             
-    exit 0
-    ;;
+move_conffile ()
+{
+       dpkg --compare-versions "$1" ge-nl "1.9.11" && return;
+       [ ! -e /etc/dict.conf ] && return;
+       [ -e /etc/dictd/dict.conf ] && return;
+       [ -d /etc/dictd ] || mkdir /etc/dictd;
+       touch /etc/dict.conf.moved_by_preinst;
+       mv -v /etc/dict.conf /etc/dictd/dict.conf >&2;
+}
 
-    install|failed-upgrade|abort-install|abort-upgrade|disappear)
-     exit 0
-    ;;
-
-    *)
-        echo "preinst called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
+case "$1" in
+install|upgrade)
+       # /etc/dict.conf moved to /etc/dictd/dict.conf in 1.9.11
+       move_conffile "$2"
+       ;;
+
+abort-upgrade)
+       # Postrm has only error handling; nothing to undo
+       ;;
+
+*)
+       echo "preinst called with unknown argument \`$1'" >&2
+       exit 1
+       ;;
 esac
-
-     exit 0


--- End Message ---
--- Begin Message ---
Source: dictd
Source-Version: 1.10.2-3.1

We believe that the bug you reported is fixed in the latest version of
dictd, which is due to be installed in the Debian FTP archive:

dict_1.10.2-3.1_amd64.deb
  to pool/main/d/dictd/dict_1.10.2-3.1_amd64.deb
dictd_1.10.2-3.1.diff.gz
  to pool/main/d/dictd/dictd_1.10.2-3.1.diff.gz
dictd_1.10.2-3.1.dsc
  to pool/main/d/dictd/dictd_1.10.2-3.1.dsc
dictd_1.10.2-3.1_amd64.deb
  to pool/main/d/dictd/dictd_1.10.2-3.1_amd64.deb
dictfmt_1.10.2-3.1_amd64.deb
  to pool/main/d/dictd/dictfmt_1.10.2-3.1_amd64.deb
dictzip_1.10.2-3.1_amd64.deb
  to pool/main/d/dictd/dictzip_1.10.2-3.1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julien BLACHE <[EMAIL PROTECTED]> (supplier of updated dictd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 12 Jan 2007 14:23:45 +0100
Source: dictd
Binary: dictfmt dictd dictzip dict
Architecture: source amd64
Version: 1.10.2-3.1
Distribution: unstable
Urgency: low
Maintainer: Kirk Hilliard <[EMAIL PROTECTED]>
Changed-By: Julien BLACHE <[EMAIL PROTECTED]>
Description: 
 dict       - Dictionary Client
 dictd      - Dictionary Server
 dictfmt    - Utility to format a file for use by the dictd server
 dictzip    - Compression utility for dictionary databases
Closes: 372144 405863
Changes: 
 dictd (1.10.2-3.1) unstable; urgency=low
 .
   * Non-Maintainer Upload.
   * debian/control:
     + Bumped Standards-Version to 3.7.2 (no changes).
   * debian/rules:
     + Remove libmaa/config.{guess,sub} in clean target.
     + Remove libmaa/arggram2c in clean target (autogenerated).
     + Add debian/substvars to FILES_TO_CLEAN.
     + Fix the way symlinks were created.
   * debian/copyright:
     + Update FSF address.
   * debian/changelog:
     + Removed bogus changelog entry for version 1.9.9-4.
   * debian/preinst:
     + Fix &> bashism.
   * debian/postrm:
     + Fix &> bashism.
   * debian/dict.conf:
     + Added alternative dict servers to the configuration file, as dict.org
       seems to be down, making the package unusable (closes: #405863).
   * debian/preinst-dict, debian/postinst-dict, debian/postrm-dict:
     + Applied patch from Justin Pryzby, fixing various errors in the maintainer
       scripts (closes: #372144).
Files: 
 90fe7ffdae72b6d05fe106347c3d468a 667 text optional dictd_1.10.2-3.1.dsc
 2493b9285667d74612bd8b8924745915 46725 text optional dictd_1.10.2-3.1.diff.gz
 eb4f663952b3a2015136e4b2f5e25b96 147354 text optional 
dictd_1.10.2-3.1_amd64.deb
 1fad6c8d5944ef4d8f841ee53c6e8fd0 83868 text optional dict_1.10.2-3.1_amd64.deb
 57a525e018181fcb76708e9b4228b485 62802 text optional 
dictzip_1.10.2-3.1_amd64.deb
 d385988cf22c6bf85b88ea79220d8c52 72362 utils optional 
dictfmt_1.10.2-3.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFp4wrzWFP1/XWUWkRAg0fAJwJQ25ymvmpxZTnfydw7Uxc9zGzlgCeIPRm
3nNgr89BIkoyeycudgayz3M=
=fse3
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to