*Synopsis*: libast getopt solaris compatibility broken
CR 6909579 changed on Mar 29 2010 by <User 1-5Q-9201>
=== Field ============ === New Value ============= === Old Value =============
Commit to Fix in Build snv_137
Status 7-Fix in Progress 5-Cause Known
SubType Functionality
====================== =========================== ===========================
*Change Request ID*: 6909579
*Synopsis*: libast getopt solaris compatibility broken
Product: solaris
Category: shell
Subcategory: korn93
Type: Defect
Subtype: Functionality
Status: 7-Fix in Progress
Substatus:
Priority: 2-High
Introduced In Release: solaris_nevada
Introduced In Build: snv_72
Responsible Engineer: <User 1-5Q-9201>
Keywords: oss-request, oss-sponsor
=== *Description* ============================================================
in the opensolaris of snv_128, getopts failed to deal with a short/long options
mix.
getopts "d:(directory)f:(file)(input-file)o:(output-file)" opt
and getopts "d:f:o:" opt worked fine, but
getopts "d:f:(file)(input-file)o:(output-file)" opt failed with "-f: unknown
option" when invoked with "-f tmpfile"
*** (#1 of 1): 2009-12-11 07:58:07 GMT+00:00 <User 1-FHVYR>
=== *Public Comments* ========================================================
libast/optget/init (in usr/src/lib/libast/common/misc/optget.c) function
wrongly converts solaris style getopts optstring
input: d:f:(file)o:(output-file)
output: [-][d]:[string][::file][o:output-file]:[string]
should be: [-][d]:[string][f:file][o:output-file]:[string]
I have preliminary fix, but have to test it throughly first.
*** (#1 of 1): [ UNSAVED ] <email address omitted>
*** (#1 of 3): 2009-12-18 18:55:30 GMT+00:00 <User 1-PWPBN>
Glenn Fowler from AT&T (the ksh93 upstream maintainer) writes:
---
Date: Fri, 18 Dec 2009 14:31:32 -0500
From: Glenn Fowler <<email address omitted>>
To: <email address omitted>
I guess either my previous message didn't make it or wasn't clear enough
the problem has been replicated and a fix will be in the next beta due
today
---
ksh93 project member <email address omitted> has requested a sponsor
for the putback of this fix via the OpenSolaris request-sponsor process.
*** (#2 of 3): 2009-12-19 02:46:57 GMT+00:00 <User 1-5Q-1267>
I'm removing myself from responsible enginner position, as there is supposed to
be fix out there. I'm also returning the bug to Cause Known state.
--
Vlad
*** (#3 of 3): 2009-12-21 12:31:18 GMT+00:00 <User 1-PWPBN>
=== *Workaround* =============================================================
Moving long options to the beginning of optstring might work with a bit of luck
This works
f:(file)o:(output-file)d:
This does not
d:f:(file)o:(output-file)
*** (#1 of 1): 2009-12-17 14:03:43 GMT+00:00 <User 1-PWPBN>
*** Last Edit: 2009-12-18 18:55:30 GMT+00:00 <User 1-PWPBN>
=== *Additional Details* =====================================================
Targeted Release: solaris_nevada
Commit To Fix In Build: snv_137
Fixed In Build:
Integrated In Build:
Verified In Build:
See Also: 6909580
Duplicate of:
Hooks:
Hook1:
Hook2:
Hook3:
Hook4:
Hook5: <email address omitted>
Hook6: <email address omitted>
Program Management:
Root Cause:
Fix Affects Documentation: No
Fix Affects Localization: No
=== *History* ================================================================
Date Submitted: 2009-12-11 07:58:07 GMT+00:00
Submitted By: <User 1-FHVYR>
Status Changed Date Updated Updated By
2-Incomplete 2009-12-15 15:38:53 GMT+00:00 <User 1-PWPBN>
1-Dispatched 2009-12-16 01:34:27 GMT+00:00 <User 1-FHVYR>
3-Accepted 2009-12-17 14:03:43 GMT+00:00 <User 1-PWPBN>
6-Fix Understood 2009-12-18 18:55:30 GMT+00:00 <User 1-PWPBN>
5-Cause Known 2009-12-21 12:31:18 GMT+00:00 <User 1-PWPBN>
7-Fix in Progress 2010-03-29 03:16:23 GMT+00:00 <User 1-5Q-9201>
=== *Service Request* ========================================================
Impact: Significant
Functionality: Secondary
Severity: 3
Product Name: solaris
Product Release: osol_2009.06u9
Product Build:
Operating System: osol_2009.06u6
Hardware: generic
Submitted Date: 2009-12-11 07:58:08 GMT+00:00
=== *Multiple Release (MR) Cluster* - 0 ======================================