Activity log for bug #607099

Date Who What changed Old value New value Message
2010-07-19 08:14:34 Ralph Corderoy bug added bug
2010-07-19 08:31:58 Nathan Baum description Binary package hint: bsd-mailx bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1 on 10.04 treats a mail body that's a single empty line as a empty body. This causes a warning on stdout that's impossible to silence through any option, and is broken behaviour compared to the long-existing mail(1) program on different Unixes over the years. $ mail -s test ralph </dev/null Null message body; hope that's ok $ echo | mail -s test ralph Null message body; hope that's ok $ echo | hd 00000000 0a |.| 00000001 $ The first diagnostic is correct, there was no message body. The second is wrong, there was a message body, an empty line. The upstream bsd-mailx does not have this fault. It has been introduced by the fix to http://bugs.debian.org/355545. I, like commentator Thue Janus Kristensen, think the bug should have been rejected as it wasn't a bug but a misunderstanding by the originator. Instead, bsd-mailx_8.1.2-0.20090911cvs-2ubuntu1.diff.gz on 10.04 includes +/* check if file is empty or contains only a new line */ +/* Debian Bug#355545 */ +static int fisempty(FILE *mtf) +{ + off_t size; + char c; + if ((size = fsize(mtf)) == 0) return 1; + if (size > 1) return 0; + fseek(mtf, 0, SEEK_SET); + c = fgetc(mtf); + fseek(mtf, 0, SEEK_SET); + return (c == '\n'); +} This needs removing and the call to it reverting to the pre-patch if (fsize(mtf) == 0) { As it stands, long-term scripts that do `echo | mail ...' in order to avoid the warning on stdout now fail. It is not them in the wrong, as is confirmed by package heirloom-mailx's mail(1), and mail(1) on other Unixes. Please drop this Debian change. Binary package hint: bsd-mailx bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1 on 10.04 treats a mail body that's a single empty line as a empty body. This causes a warning on stdout that's impossible to silence through any option, and is broken behaviour compared to the long-existing mail(1) program on different Unixes over the years.     $ mail -s test ralph </dev/null     Null message body; hope that's ok     $ echo | mail -s test ralph     Null message body; hope that's ok     $ echo | hd     00000000 0a |.|     00000001     $ The first diagnostic is correct, there was no message body. The second is wrong, there was a message body, an empty line. The upstream bsd-mailx does not have this fault. It has been introduced by the fix to http://bugs.debian.org/355545. I, like commentator Thue Janus Kristensen, think the bug should have been rejected as it wasn't a bug but a misunderstanding by the originator. Instead, bsd-mailx_8.1.2-0.20090911cvs-2ubuntu1.diff.gz on 10.04 includes     +/* check if file is empty or contains only a new line */     +/* Debian Bug#355545 */     +static int fisempty(FILE *mtf)     +{     + off_t size;     + char c;     + if ((size = fsize(mtf)) == 0) return 1;     + if (size > 1) return 0;     + fseek(mtf, 0, SEEK_SET);     + c = fgetc(mtf);     + fseek(mtf, 0, SEEK_SET);     + return (c == '\n');     +} This needs removing and the call to it reverting to the pre-patch     if (fsize(mtf) == 0) { As it stands, long-term scripts that do `echo | mail ...' in order to avoid the warning on stdout now fail. It is not them in the wrong, as is confirmed by package heirloom-mailx's mail(1), and mail(1) on other Unixes. Please drop this Debian change.
2010-07-19 08:46:50 Nathan Baum bsd-mailx (Ubuntu): status New Confirmed
2013-10-06 16:17:55 Launchpad Janitor branch linked lp:debian/bsd-mailx
2013-10-21 13:43:51 Launchpad Janitor bsd-mailx (Ubuntu): status Confirmed Fix Released
2013-10-23 16:05:41 Launchpad Janitor branch linked lp:ubuntu/bsd-mailx