Bug 42630

Summary: fconfigure doesn't recognize -mode switch
Product: [Retired] Red Hat Linux Reporter: Daryll <daryll>
Component: tcltkAssignee: Jens Petersen <petersen>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: anne.possoz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-27 18:30:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daryll 2001-05-28 22:50:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
The fconfigure command is not accepting the -mode option. It reports that
the option isn't supported. This is used to setup serial line parameters in
tcl scripts. 

How reproducible:
Always

Steps to Reproduce:
This code from gpsman package:

proc OpenSerialFailed {baud} {
    # open serial port at given baud rate, and log file if needs be
    # return 1 on failure
    global MESS SRLFILE SERIALPORT InBuff Polling Eof tcl_platform \
	    NotLogging LogFile SERIALLOG

    if { [catch "set SRLFILE [open $SERIALPORT r+]"] } {
	GMMessage [format $MESS(badserial) $SERIALPORT]
	return 1
    }
    switch $tcl_platform(platform) {
	unix {
	    set Polling 0 ; set InBuff ""
	    fconfigure $SRLFILE -blocking 0 -mode $baud,n,8,1 \
		    -translation binary
	    fileevent $SRLFILE readable ReadChar
	}
	windows {
	    # Tcl/Tk 8.0p2 does not support I/O from/to serial ports
	    set Polling 1 ; set InBuff ""
	    fconfigure $SRLFILE -blocking 0 -mode $baud,n,8,1 \
		    -translation binary
	    after 0 ReadChar
	}
	default {
	    GMMessage $MESS(badplatform)
	    return 1
	}
    }
    set Eof 0
    if {! $NotLogging && "$LogFile" == "" } { set LogFile [open $SERIALLOG
w] }
    return 0
}

	

Additional info:

My understanding is that there is a unix capabilities option to compile tcl
that isn't set. 
I read on a newsgroup that this is fixed in Mandrake's tcltk package.

Comment 1 Anne Possoz 2001-06-27 18:30:48 UTC
This is the same as bug 22187 (raised in redhat 7.0)

The solution is still the same:

Rebuild it
rpm --rebuild /net/zzz/SRPMS/tcltk-8.3.1-53.src.rpm

and replace it:
rpm -ivh --replacefiles --replacepkgs /usr/src/redhat/RPMS/i386/tcl-8.3.1-53.rpm

I guess the Additional comments from max 2001-03-08 11:45:19 (bug 22187)
is still valid.

Comment 2 Eido Inoue 2001-06-28 14:36:01 UTC

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