>Mike Gerdts wrote:
>> Based up feedback I received over the past few weeks, I have written
>> the code to do the following:
>> 
>> - If MANPATH is set, it is used (no change in behavior)
>> 
>> - If MANPATH is not set, construct a MANPATH based upon PATH using the
>>   following rules:
>> 
>>   - For each PATH element, add <element>/../share/man to manpath
>>   - If ../share/man does not exist, try ../man
>>   - All manpath elements are passed through realpath()
>>   - Duplicates are eliminated
>>   - The default manpath (MANDIR == /usr/share/man) is appended if it
>>     was not already part of the list.
>
>That sounds reasonable.  Given this change in behaviour an ARC case 
>would be required to integrate these changes.  I'd be happy to sponsor 
>that ARC case for you.


As implementation note I would suggest that the MANPATH is searched while
it is constructed, not constructed first completely and then searched.

To eliminate duplicates, realpath() isn't really nessary; just caching the
results of stat() on the directory should be sufficient.

One additional consideration is potentially the behaviour of

PATH=/usr/ucb:/usr/bin

vs

PATH=/usr/bin:/usr/ucb

I'd like to get the proper "ps" manual page in both cases.


Come to think of it, it would also be nice to be able to say:

        man /usr/bin/ps

and have this expand to something akin to:

        man -M /usr/bin/../share/man ps

(again, tricky for /usr/ucb which needs to be special cased, if we actually
care about that as the man behaviour is currently broken in that case 
anyway)

Casper

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to