Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36337 - sys-apps/coreutils-5.0.91-r2 has broken 'seq'
Summary: sys-apps/coreutils-5.0.91-r2 has broken 'seq'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-22 18:25 UTC by Robin Johnson
Modified: 2004-03-05 19:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
seq.c.patch (seq.c.patch,1.04 KB, patch)
2004-02-22 00:22 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-22 18:25:10 UTC
seq with reverse sequences is broken in coreutils-5.0.91-r2.

output from "seq 5 1"
coreutils-5.0-r3:
5
4
3
2
1

coreutils-5.0.91-r2:
(nothing)

Reproducible: Always
Steps to Reproduce:



Expected Results:  
should produce correct reverse sequences

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0, 
2.4.22-pre10-ac1)
=================================================================
System uname: 2.4.22-pre10-ac1 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
hare/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/
dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/c
onfig/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/alias /var/qmail/control /var
/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/gentoo-distfiles"
FEATURES="autoaddcvs buildpkg ccache cvs digest nostrip sandbox xmanifestsign"
GENTOO_MIRRORS="http://gentoo.ccccom.com http://mirrors.tds.net/gentoo 
ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.noved.org/ http://csociety-
ftp.ecn.purdue.edu/pub/gentoo/"
MAKEOPTS="-j1"
PKGDIR="/usr/gentoo-packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/gentoo-cvs/gentoo-x86"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acl acpi alsa amd apache2 apm arts avi berkdb bots cdr 
clearpasswd crypt cups curl directfb dvd encode esd ethereal expat fbcon 
firebird flash foomaticdb freetds gd gdbm ggi gif ginac gmtfull gmthigh 
gmtsuppl gmttria gnome gpm gps gtk gtk2 gtkhtml imap imlib innodb ipalias ipv6 
jack java jikes jpeg junit kde ldap libg++ libwww lirc mad maildir mcal md5sum 
mikmod mmx motif mozilla mpeg mpi mysql nas ncurses nls oav offensive oggvorbis 
ospfapi oss pam pcap pda pdflib perl pic plotutils png pnp ppds python qhull qt 
readline samba sasl scanner sdl slang slp snmp socks5 spell sse ssl svga tcltk 
tcpd tetex tiff truetype type1 ungif usagi usb v4l vscan wmf wxwindows x86 xml 
xml2 xmms xv zlib"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-27 13:30:01 UTC
seems like you have to set the increment to -1 for backwards seq to work

I'm looking into a patch to enable the old behaviour
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-29 20:15:31 UTC
robin, can you check this with coreutils-5.0.91-r3 as well, please?
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-29 20:16:11 UTC
never mind :/  
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-04 18:52:15 UTC
this is the relevant item from the coreutils ChangeLog:

2003-09-04  Paul Eggert  <eggert@twinsun.com>
    * src/seq.c (step): Default to 1.
    (print_numbers): Allow the output to be empty.
    (main): The default step is 1, even if LAST < FIRST;
    as per documentation.

now this raises the question of the correct behavior.
should it be the same as sh-utils and coreutils previous to the broken version? eg 'seq 5 1' works, or should it return no output?
Comment 5 SpanKY gentoo-dev 2004-02-22 00:22:46 UTC
Created attachment 26082 [details, diff]
seq.c.patch
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-05 19:35:10 UTC
fixed in 5.2.0