Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 472738

Summary: sys-apps/coreutils-8.20: wrong implementation of the -s option of seq
Product: Gentoo Linux Reporter: marius.spix
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description marius.spix 2013-06-09 11:05:28 UTC
The implementation of the -s option of seq produces wrong results. See "Actual Results" and "Expected Results"

Reproducible: Always

Steps to Reproduce:
seq -s ';' 10
Actual Results:  
1
2;3;4;5;6;7;8;9;10;


Expected Results:  
1;2;3;4;5;6;7;8;9;10


Because it caused many program faults on my system I would classify this
bug as a major blocker.

I have currently switched to the busybox implementation until this bug will be fixed.
Comment 1 marius.spix 2013-06-09 11:06:43 UTC
Note that the first '\n' in the actual results is not replaced by a ';' when it should be.
Comment 2 marius.spix 2013-06-09 11:08:00 UTC
Additional Information:

mari@spixxi ~ $ eix coreutils
[I] sys-apps/coreutils
     Available versions:  8.5 ~8.5-r1 8.7 ~8.8 ~8.9 ~8.10 ~8.11 ~8.12
~8.13 8.14 ~8.15 8.16 ~8.17 ~8.18 ~8.19 8.20 ~8.20-r1 ~8.20-r2 {{acl
caps gmp nls selinux static unicode userland_BSD vanilla xattr}}
     Installed versions:  8.20(14:15:05 20.01.2013)(acl nls -caps -gmp
-selinux -static -userland_BSD -vanilla -xattr)
     Homepage:            http://www.gnu.org/software/coreutils/
     Description:         Standard GNU file utilities (chmod, cp, dd,
dir, ls...), text utilities (sort, tr, head, wc..), and shell utilities
(whoami, who,...)

mari@spixxi ~ $ uname -srp
Linux 3.8.13-gentoo Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz

mari@spixxi ~ $ grep "CFLAGS" /etc/portage/make.conf
CFLAGS="-march=native -O2 -pipe"

mari@spixxi ~ $ gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper
Ziel: x86_64-pc-linux-gnu
Konfiguriert mit:
/var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-cloog --without-ppl --enable-lto
--enable-nls --without-included-gettext --with-system-zlib
--enable-obsolete --disable-werror --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python
--enable-checking=release --disable-libgcj --enable-libstdcxx-time
--enable-objc-gc --enable-languages=c,c++,objc,obj-c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-targets=all
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3
p1.13, pie-0.5.2'
Thread-Modell: posix
gcc-Version 4.6.3 (Gentoo 4.6.3 p1.13, pie-0.5.2)
Comment 3 marius.spix 2013-06-09 11:11:46 UTC
The output of

seq -s ';' -1 10

is correct:

-1;0;1;2;3;4;5;6;7;8;9;10

But the output of

seq -s ';' 0 10

is not correct:

0
1;2;3;4;5;6;7;8;9;10;
Comment 4 marius.spix 2013-06-09 11:22:06 UTC
Another thing (but not so important is that)

seq -s ';' -- -0 10

prints

-0
-1;-2;-3;-4;-5;-6;-7;-8;-9;.0;.1;.2;.3;.4;.5;.6;.7;.8;.9;/0;/1;/2;/3;/4;/5;/6;/7;/8;/9;00;01;02;03;04;05;06;07;08;09;10;

It has to print either

-0;1;2;3;4;5;6;7;8;9;10

or

0;1;2;3;4;5;6;7;8;9;10
Comment 5 marius.spix 2013-06-09 11:37:45 UTC
Additional Information:

mari@spixxi ~ $ emerge --info
Portage 2.1.11.62 (default/linux/amd64/13.0/no-multilib, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo x86_64)
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     3745228 total,   2208880 free
KiB Swap:    8393724 total,   8393724 free
Timestamp of tree: Fri, 07 Jun 2013 13:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo seden sunrise
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ ftp://de-mirror.org/gentoo/ http://de-mirror.org/gentoo/ rsync://de-mirror.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://gentoo.mneisen.org/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/ rsync://mirror.opteamax.de/gentoo/ http://mirror.opteamax.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://ftp.join.uni-muenster.de/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp-stud.hs-esslingen.de/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo rsync://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ ftp://mirror.leaseweb.com/gentoo/ rsync://gentoo.tiscali.nl/gentoo/ ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ http://gentoo.tiscali.nl/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo rsync://ftp.snt.utwente.nl/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/seden /var/lib/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit X a52 aac acl acpi aes alsa amd64 apng avahi berkdb boost bzip2 cairo cdda cli consolekit corefonts cracklib crypt cups custom-optimization cvs cxx dbus dri dv dvd egl exif ffmpeg flac fluidsynth fontconfig fortran fuse g3dvl gbm gdbm gif gimp glamor gles1 gles2 gnome-keyring gnutls gold gpm gstreamer gtk gtk2 gudev gvfs gz hal hwdb iconv imagemagick introspection ipv6 java jpeg jpeg2k kerberos keymap kvm lame libkms libnotify lilo lock lto lua lxde lzma mad midi minizip mmx mod modplug modules mono mp3 mpeg mudflap ncurses nls nptl nsplugin objc objc++ objc-gc ogg opengl openmp openvg oss pam pcre pdf perl png policykit python qemu readline samba sasl script sdl seamonkey secure-delete session slang smp spicy spidermonkey sqlite ss sse sse2 sse3 sse4_1 sse4_2 ssl ssse ssse3 startup-notification subversion sudo svg system-jpeg system-sqlite tcl tcpd theora threads tiff tk tpm truetype udev udisks uml unicode unlock-notify usb usbredir uxa v4l vala vcd virt-network vorbis wav wifi wpa_supplicant xa xar xml xorg xvmc xz zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de de_DE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="intel vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 6 Rafał Mużyło 2013-06-09 11:58:12 UTC

*** This bug has been marked as a duplicate of bug 448716 ***