Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138592 - readline echo behaviour change from 5.0-r2 to 5.1_p4
Summary: readline echo behaviour change from 5.0-r2 to 5.1_p4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://lists.gnu.org/archive/html/bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-30 09:12 UTC by Joel B. Mohler
Modified: 2012-07-20 21:10 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel B. Mohler 2006-06-30 09:12:49 UTC
I believe the best way to communicate this bug is to illustrate it with a very simple example.  The crux of the matter is that newer readline echos input when it is getting input from a file via bash redirection.  The old readline did not.  Indeed, I'm not sure if it's a bug.  I could conceive that it would be a desired feature, but it certainly seems it would be unexpected -- it was unexpected by me.  Consider the following output.  I start with readline-5.0-r2:

<<<<  lines like this one are inserted extra >>>>>

**************************
joel@friedrich$ cat readlinetest.c
#include <stdio.h>
#include "readline/readline.h"

int main()
{
        readline( NULL );
        return 0;
}
joel@friedrich$ g++ -lreadline -o readlinetest readlinetest.c
joel@friedrich$ echo "test" > test
<<<< I would expect that the next two lines have identical output, they do >>>>>
joel@friedrich$ ./readlinetest <test
joel@friedrich$ cat test | ./readlinetest
<<<< emerge readline-5.1_p4 and try again >>>>>
<<<< Notice:  the contents of file test is echoed!? >>>>
joel@friedrich$ ./readlinetest <test
test
joel@friedrich$ cat test | ./readlinetest
<<<< emerge readline-5.0-r2 and try again for sanity check >>>>>
joel@friedrich$ ./readlinetest <test
joel@friedrich$ cat test | ./readlinetest
*********************************

I marked the severity "normal", but for someone relying on the old operation in a shell pipeline it could be a major annoyance.

Here's my emerge --info:
Portage 2.1-r1 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.16.16 i686)
=================================================================
System uname: 2.6.16.16 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/gcc-config: 1.3.12-r4
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com/ http://gentoo.mirrors.pair.com/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X alsa apm avi bcmath berkdb bitmap-fonts cdparanoia cdr cli crypt cups curl divx4linux dri dvd eds emboss encode foomaticdb fortran gdbm gif gphoto2 gpm gstreamer gtk2 imap imlib innodb ipv6 isdnlog jpeg kde libg++ libwww mad maildir mikmod motif mp3 mpeg mysql mysqli ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pcre pdflib perl php pic pie png ppds pppd python qt quicktime readline reflection sdl session spell spl ssl svg tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis wmf xinerama xml2 xorg xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2006-10-12 16:30:01 UTC
you could try readline-5.2
Comment 2 Joel B. Mohler 2007-02-16 21:47:02 UTC
(In reply to comment #1)
> you could try readline-5.2
> 

readline-5.2_p1 exhibits the wrong behavior.
Comment 3 SpanKY gentoo-dev 2008-03-01 20:39:07 UTC
upstream says it'll be fixed in the next version