retitle 301213 ipop3: upgrade to 7:2002edebian1-6.1 fails (grep)
reassign 301213 uw-imapd,ipopd
severity 301213 serious
tag 301213 patch
thanks
I'm seeing exactly the same problem here. The "you already have..." message
isn't the problem - it's the previous line about the pre-installation script.
This is caused by there being no imap line in inetd.conf: grep exits with
code 1 if no matching lines were found. Unfortunately, the "set -e" catches
this and treats it as an error.
It looks like this bug was introduced by the fix for 295306; as such, it
applies to both uw-imapd and ipopd.
--
| Darren Salt | nr. Ashington, | linux (or ds) at
| woody, sarge, | Northumberland | youmustbejoking
| RISC OS | Toon Army | demon co uk
| Oh, sarge too...
I think, therefore I am paid.
--- uw-imap-2002edebian1.orig/debian/ipopd.preinst
+++ uw-imap-2002edebian1/debian/ipopd.preinst
@@ -1,7 +1,5 @@
#!/bin/sh
-set -e
-
PROGRAM=ipopd
MY_FILE=/var/cache/${PROGRAM}_inetd.conf_copy
@@ -12,5 +10,6 @@
# will remove entries from /etc/inetd.conf, so we save them for
# restoring them in the postinst.
grep -E "^([# ]+|#<off># +)?imap[23s]" /etc/inetd.conf >>"$MY_FILE"
+ RET=$?; test "$RET" \> 1 && exit "$RET"
fi
--- uw-imap-2002edebian1.orig/debian/uw-imapd.preinst
+++ uw-imap-2002edebian1/debian/uw-imapd.preinst
@@ -1,7 +1,5 @@
#!/bin/sh
-set -e
-
PROGRAM=uw-imapd
MY_FILE=/var/cache/${PROGRAM}_inetd.conf_copy
@@ -12,5 +10,6 @@
# will remove entries from /etc/inetd.conf, so we save them for
# restoring them in the postinst.
grep -E "^([# ]+|#<off># +)?imap[23s]" /etc/inetd.conf >>"$MY_FILE"
+ RET=$?; test "$RET" \> 1 && exit "$RET"
fi