Subject: bug#13227: seq -s broken in coretutils 8.20?

From: Pádraig Brady <[email-masked]>
Date: Wed, 19 Dec 2012 19:01:04 +0000

On 12/19/2012 04:53 PM, Philipp Gortan wrote:
> Dear coreutils crowd,
>
> I recently upgraded the coreutils on my Gentoo AMD64 from 8.16 to 8.20.
> I used the seq command to generate the values of an SQL "in" statement.
> Since I upgraded, the SQL is no longer correct - here is what I found out:
>
> $ seq -s, 6 9; seq --version
>
> 6
> 7,8,9,seq (GNU coreutils) 8.20
> ...
>
> (nb: newline after the "6", the comma after the 9 and the missing newline)
>
> After downgrading to 8.16, I get:
>
> $ seq -s, 6 9; seq --version
> 6,7,8,9
> seq (GNU coreutils) 8.16
> ...
>
> For reference, on a RHEL 5.6, the output is also:
>
> $ seq -s, 6 9; seq --version
> 6,7,8,9
> seq (GNU coreutils) 5.97
>
>
> So to me, it looks as if the speed optimizations in 8.20 broke the "-s"
> feature of seq.
>
> I have recompiled coreutils with the vanilla useflag, which means that
> no gentoo-specific patches are applied. The attachted text file contains
> further information (compiler version and flags, etc.).
>
> Can anyone reproduce this behavior?

Yes confirmed :(
Looks like we used puts() in the new code
which unconditionally writes a '\n'

patch coming up...

thanks,
Pádraig.