Bug#301213: ipopd: upgrade to 7:2002edebian1-6.1 fails
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 26-03-2005 14:37, Darren Salt wrote: 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. Thanks for investigating! Sounds sane - I haven't had time to look into the problem myself yet, but with this info it should be fairly trivial to correct the error - I'll have a look at it right away... - Jonas - -- * Jonas Smedegaard - idealist og Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ - Enden er nær: http://www.shibumi.org/eoti.htm -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCRddnn7DbMsAkQLgRAuBOAJ4ieLOx/jGPwx8n1eTNZp+Zj9IdwgCggUAH 2Qlrop2h4Jmz3sT/OBEd0CY= =9R3T -END PGP SIGNATURE-
Bug#301213: ipopd: upgrade to 7:2002edebian1-6.1 fails
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 26-03-2005 14:37, Darren Salt wrote: --- 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 I really don't like diabling the set -e completely. Is the problem not with the grep lines only? To keep the code compact I'd just append this to the grep lines: || true if [ $? \ 2 ] Do you see a problem with that? - Jonas - -- * Jonas Smedegaard - idealist og Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ - Enden er nær: http://www.shibumi.org/eoti.htm -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCReV7n7DbMsAkQLgRAtS7AJ9j7yFTU0yOjtYT8t/YPG8fdlkIDwCdFVZn mUx4sEKkQrlxgalXwErGb20= =joSZ -END PGP SIGNATURE-
Bug#301213: ipopd: upgrade to 7:2002edebian1-6.1 fails
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27-03-2005 00:13, Steve Langasek wrote: On Sat, Mar 26, 2005 at 11:43:07PM +0100, Jonas Smedegaard wrote: On 26-03-2005 14:37, Darren Salt wrote: --- 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 I really don't like diabling the set -e completely. Is the problem not with the grep lines only? To keep the code compact I'd just append this to the grep lines: || true if [ $? \ 2 ] Do you see a problem with that? It's not POSIX sh syntax? true if is actually a waste. The following is POSIXly correct, I beieve: || [ $? \ 2 ] or must it instead be this: || test $? \ 2 - Jonas P.S. Where to find good info on POSIX sh syntax? - -- * Jonas Smedegaard - idealist og Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ - Enden er nær: http://www.shibumi.org/eoti.htm -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCRfB4n7DbMsAkQLgRAoHCAJ9BOgp40ovs8ipthq9pvadUIDcevwCcD2Am Cbaq7Rmu294psuyoCvD/qVY= =w0Gq -END PGP SIGNATURE-
Bug#301213: ipopd: upgrade to 7:2002edebian1-6.1 fails
On Sun, Mar 27, 2005 at 12:30:19AM +0100, Jonas Smedegaard wrote: On 27-03-2005 00:13, Steve Langasek wrote: On Sat, Mar 26, 2005 at 11:43:07PM +0100, Jonas Smedegaard wrote: To keep the code compact I'd just append this to the grep lines: || true if [ $? \ 2 ] Do you see a problem with that? It's not POSIX sh syntax? true if is actually a waste. The following is POSIXly correct, I beieve: || [ $? \ 2 ] or must it instead be this: || test $? \ 2 Either [ or test is fine in POSIX sh, as they're required aliases. However, I don't think \ is a POSIX test operator -- I think you want -lt instead. Where to find good info on POSIX sh syntax? AIUI the POSIX spec is available for download online, but I don't remember where. Otherwise, you could just test your scripts under dash as well as bash. -- Steve Langasek postmodern programmer signature.asc Description: Digital signature
Bug#301213: ipopd: upgrade to 7:2002edebian1-6.1 fails
I demand that Jonas Smedegaard may or may not have written... On 26-03-2005 23:43, Jonas Smedegaard wrote: [snip patch] I really don't like diabling the set -e completely. Is the problem not with the grep lines only? To keep the code compact I'd just append this to the grep lines: || true if [ $? \ 2 ] Or even better (in case true if turns out to be a bashism): No; it just doesn't work - true ignores its parameters. || [ $? \ 2 ] # catch grep failures That seems to work, but you need -lt (numeric), not (string). -- | Darren Salt | nr. Ashington, | linux (or ds) at | woody, sarge, | Northumberland | youmustbejoking | RISC OS | Toon Army | demon co uk | Oh, sarge too... Borg mailreader: Taglines are irrelevant. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#301213: ipopd: upgrade to 7:2002edebian1-6.1 fails
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27-03-2005 00:34, Steve Langasek wrote: On Sun, Mar 27, 2005 at 12:30:19AM +0100, Jonas Smedegaard wrote: On 27-03-2005 00:13, Steve Langasek wrote: On Sat, Mar 26, 2005 at 11:43:07PM +0100, Jonas Smedegaard wrote: To keep the code compact I'd just append this to the grep lines: || true if [ $? \ 2 ] Do you see a problem with that? It's not POSIX sh syntax? true if is actually a waste. The following is POSIXly correct, I beieve: || [ $? \ 2 ] or must it instead be this: || test $? \ 2 Either [ or test is fine in POSIX sh, as they're required aliases. However, I don't think \ is a POSIX test operator -- I think you want -lt instead. Ah, thanks. So many errors lurking in such little code snippet :-) Where to find good info on POSIX sh syntax? AIUI the POSIX spec is available for download online, but I don't remember where. Hmm - with good I thought more of easy to digest than official. Haven't checked but I imagine the spec is similar to RFCs (which is not easy to digest IMHO). Otherwise, you could just test your scripts under dash as well as bash. I know. But info on POSIXly correct coding style is not the same as throwing code at a (hopefully 100%) POSIXly correct shell and see if it complains. - Jonas - -- * Jonas Smedegaard - idealist og Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ - Enden er nær: http://www.shibumi.org/eoti.htm -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCRfeMn7DbMsAkQLgRArbHAJwJ8XJT462A/1n8jwoRb4DRe2NpuQCfRM4e a0CSV+Z+LWp+hUflGzZEw2s= =OyIC -END PGP SIGNATURE-