Date: Thu, 17 Jan 2008 09:30:25 GMT From: Jean Benoit <j.benoit@free.fr> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/119739: expect-devel : glob pattern matching doesn't work for character range Message-ID: <200801170930.m0H9UP18088902@www.freebsd.org> Resent-Message-ID: <200801170940.m0H9e12u072295@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 119739 >Category: ports >Synopsis: expect-devel : glob pattern matching doesn't work for character range >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 17 09:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jean Benoit >Release: 6.2 >Organization: CRC ULP >Environment: FreeBSD crc.u-strasbg.fr 6.2-RELEASE FreeBSD 6.2-RELEASE #9: Fri Jan 12 12:26:23 CET 2007 toor@crc.u-strasbg.fr:/usr/obj/usr/src/sys/SMP-DEBUG-62 i386 >Description: I discovered that the jlogin script in Rancid doesn't work anymore with expect-devel In fact, glob pattern matching doesn't work with character range ([a-z]) Expect just times out without identifying any character. I submitted the bug to the expect developper (ref: 1873404 ,expect bug tracker ,http://sourceforge.net/projects/expect ) It is not Freebsd specific. It is just as a follow up to http://www.freebsd.org/cgi/query-pr.cgi?pr=118452 which suggests expect-devel as a solution to a pty problem with Rancid. It is not a viable solution : expect-devel breaks other things in Rancid >How-To-Repeat: This simple expect script triggers the problem : exp_internal 1 spawn sh -c "echo a && cat" expect {[a]} {puts ok} -> expect: does "a\r\n" (spawn_id exp6) match glob pattern "[a]"? no expect: timed out I activated EXP_INTERNAL_TRACE_GLOB (tracing flag in exp_glob.c) and it says : expect: does "a\r\n" (spawn_id exp4) match glob pattern "[a]"? ESCM pattern(3)="[a]" string(3)="a\r\n" nocase=0 ESCM2 pattern="[a]" string="a\r\n" nocase=0 * pattern="[a]" * string="a\r\n" * pattern="]" * string="\r\n" @0 => -1 >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801170930.m0H9UP18088902>