On Jan 14, 2009, at 1:30 PM, James Carlson wrote:

> Dale Ghent writes:
>> In the end, this allows for multiple versions of the JRE to be
>> installed, and they're all in one place instead of spread about the
>> system.
>
> It also caused a lot of troubles with zones, as /usr isn't writable in
> "sparse root" non-global zones.  The problems included at least:

<snip>

Good points. I keep forgetting about the conditions sparse zones  
introduce.

Well, hopefully I won't be departing too far from the scope of this  
case with the follow suggestion, and I bet that it will probably cause  
some people to cringe and scrunch their nose in utter disgust.

The suggestion is to do someone a la /usr/jdk for the sunstudio  
compilers, but deliver shell scripts instead of symlinks to /usr/bin.

/usr/bin/cc for example would be a shell script (or C program,  
whatever) that looks for a particular environment variable, eg;  
$SUN_STUDIO_VER. This variable could be set to "10" or "11" or "12" or  
a specific directory under /usr/compilers.

When executed, /usr/bin/cc would look at the contents of this  
environment variable and use it to determine which "real" cc of the  
Sun Studio installations in /usr/compilers to utilize. If this  
variable is absent, a default is chosen. If it set to an ambiguous  
value, a suitable error is given.

This would grant a user in both global and sparse zones the ability to  
set a desired Sun Studio version to be default (either in their own  
environment, or in the global shell rc files).

As for the default that should be chosen in absence of the environment  
variable, I guess it could determine which is that latest Sun Studio  
that is installed and use that.

/dale

Reply via email to