Shawn Walker wrote:
> On Feb 8, 2008 10:15 AM,  <Casper.Dik at sun.com> wrote:
> > >printf also has to ingore -- so that an old script that does
> > >       printf --
> > >will no longer generate output.
> >
> > That part Solaris printf does properly.
> 
> Roland commented that:
> 
> "Erm... what should we do in this case ? The upcoming changes for
> /usr/bin/printf in OS/Net will trigger the same error in those scripts
> (remember it's stabilty status "Standard" since /usr/bin/printf _must_ pass 
> the
> VSW&co. test suites)."
> 
> I'm a little lost here on how Sun typically handles cases like these.

AFAIK it's a "bug" and not an "incompatibity". The Marvell package
script described in http://defect.opensolaris.org/bz/show_bug.cgi?id=502
just hits the unfortunate case where 1) an utilty in Solaris does not
implement the POSIX standard correctly and 2) something external (the
Marvell package script) relies on this behaviour.
AFAIK there are two options in this case:
1) Treat the issue as bug in /usr/bin/printf and report problem in the
Marvell script to the vendor
2) Treat the issue as a compability issue. In this case we have to
change the stabilty status of /usr/bin/printf from "Standard" to
"Commited", create /usr/xpg6/bin/printf (as location for the version of
"printf" which fully conforms to the standards) and bind the ksh93
builtin to /usr/xpg6/bin/printf (as a side-effect we wouldn't be able to
implement all the C99 features in /usr/bin/printf since this would
change a commited interface)

IMO I would strongly vote for [1] since [2] would result in significant
problems - the current implementation of /usr/bin/printf is
closed-source, very old (e.g. no features of PXG4/XPG6/C99 are
supported), _very_ buggy and we spend _significant_ amount of time&&work
in getting the (open-source) replacement working (which is basically
identical to ksh93's version of "printf").
 
> What happens when a bug-fix causes unexpected behaviour in programs
> and they are not exactly doing something *intentionally* wrong?

It depends on the case. In this particular case it seems the Marvell
authors didn't read the manual pages and just did some trial&&error
testing with Solaris's current implementation of /usr/bin/printf

> In this case, it looks like ksh93 won't cause any more problems than
> the upcoming changes.
> 
> With that in mind, it seem as though this could be considered a non-issue?

AFAIK this is a non-issue unless the "Interface Stabilty" of
/usr/bin/printf gets changed from "Standard" to something else. ksh93's
"printf" builtin passes the POSIX test suites (and I better not start
ranting about the current /usr/bin/printf implementation in Solaris
(which doesn't implement any C99 features, mis-handles multibyte
characters, creates values out of nowhere, sometimes just crashes etc.))
and this is AFAIK the only thing which really counts in this case.

----

Bye,
Roland

P.S.: Does anyone know how we can file a bug report to Marvell ?

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to