Bug 405381 - ksh will not handle $(xxx) when typeset -r IFS
Summary: ksh will not handle $(xxx) when typeset -r IFS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ksh
Version: rawhide
Hardware: i686
OS: Linux
low
low
Target Milestone: ---
Assignee: Tomas Smetana
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-30 04:54 UTC by Clay Harris
Modified: 2008-01-15 22:57 UTC (History)
0 users

Fixed In Version: 20071105-2.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-15 22:57:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Clay Harris 2007-11-30 04:54:37 UTC
Description of problem:
When writing shell functions, I generally typeset -r all variables
that I intend to use locally, but not alter, after they are set on the
typeset line.  However, when I do this with IFS, ksh fails on the next
evaluation of "$(xxx)".  Accesses like 'echo "IFS=$IFS"' do not cause
any problem.

Version-Release number of selected component (if applicable):
Version M 1993-12-28 r
ksh-20060214-1.1

How reproducible:

file k1:

----
#!/bin/ksh

function f1 {
    typeset -r IFS=" "

    echo "$(pwd)"
}

f1
----

Steps to Reproduce:
1. ksh ./k1
2.
3.
  
Actual results:
k1[9]: f1: line 6: IFS: is read only

Expected results:
pwd output

Additional info:
This problem does not occur using pdksh or bash.

Comment 1 Tomas Smetana 2007-11-30 10:46:37 UTC
FC-6 is not supported any longer but the described behaviour can be reproduced
on the recent ksh-20071105 in F-8 and Rawhide.  I really don't know whether this
is a bug or an intentional feature.  Will check with the upstream.

Changing the product version to devel.

Comment 2 Tomas Smetana 2007-11-30 15:21:25 UTC
It's a bug.  The fix however doesn't exist yet.  Let's see what I can do.

Comment 3 Tomas Smetana 2008-01-08 08:09:28 UTC
I have built new packages for F-8 and F-9 that should fix the issue.  They
should go to the testing repository soon.

Comment 4 Fedora Update System 2008-01-11 22:07:36 UTC
ksh-20071105-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ksh'

Comment 5 Fedora Update System 2008-01-15 22:57:37 UTC
ksh-20071105-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.