Stephen Hahn wrote: > * Roland Mainz <[EMAIL PROTECTED]> [2007-01-04 18:18]: > > Peter Memishian wrote: [snip] > > AFAIK first there would need to be a consens that replacing things like > > /usr/bin/grep with /usr/xpg4/bin/grep etc. is "ok" (and add > > /usr/xpg6/bin:/usr/xpg4/bin in front of the $PATH provided by "bldenv" > > (this is what I mean with "POSIXyfiying")) ... > > I could see ensuring that the grep (and other invocations) use the > minimal common behaviour of the "sunos", XPG, and GNU (for > porting/cross-compilation scenarios),
The idea was to enforce the usage of POSIX sematics+syntax. The tools in /usr/bin/ predate POSIX by many years and if I understand Irek's complaints the tools in /usr/bin/ are not useable for writing portable scripts (too many issues, too many missing features). IMO most of the used scripts should be more portable using the standards, not handcrafted workarounds. For example this morning I found http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6510773 ("webrev could be portable") which tries to get "webrev" working with "pdksh" - which is IMHO the worst imaginable solution for portable scripting ("pdksh" is no longer maintaind (last update was around 1999) and does not even implement the full ksh88 syntax and completey ignores POSIX). I think it may be better to handle this in a more portable manner, e.g. enforce POSIX tools in ${PATH} and make sure a POSIX shell (or one unified version of the shell like ksh93 (which explicitly provides one common scripting environment across various platforms, including Win32, MacOS X, Linux and (soon :-) Solaris)) is used. Otherwise I fear we spread lots of platform-specific, hand-crafted workarounds all other the tree which increase the maintaince demands (instead of lowering them) and worsens the overall portability instead of making it better. > but I don't see any point to > changing bldenv's default path settings. Can you characterize the > problem or problems you see these changes fixing? If we want to enforce portable scripting via using the POSIX tools then the tools in the Makefiles and in the "bldenv" interactive environment should be identical. This is why I suggested to use /usr/xpg6/bin:/usr/xpg4/bin before /usr/bin to make sure we use thos features mandated by POSIX/XPG6 (I can make a patch for that after the ksh93 putback). ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
