manpath

Ryan Schmidt ryandesign at macports.org
Mon Oct 27 22:11:01 PDT 2008


On Oct 27, 2008, at 23:57, Shawn Protsman wrote:

> On Oct 27, 2008, at 6:27 PM, Vincent Lefevre wrote:
>
>> On 2008-10-27 20:01:48 -0500, Ryan Schmidt wrote:
>>
>>> Apple sets the MANPATH to "/usr/share/man:/usr/local/share/man:/usr/
>>> X11/man" on Leopard for you. So at least Apple doesn't think it  
>>> should
>>> end with a colon.
>>
>> Apple often does things wrong. Try (while having /opt/local/bin in
>> $PATH):
>>
>> MANPATH="/usr/share/man:/usr/local/share/man:/usr/X11/man" man port
>>
>> MANPATH="/usr/share/man:/usr/local/share/man:/usr/X11/man:" man port
>>
>> Normally the first one should fail and the second should work.
>>
>> MANPATH should probably be unset anyway.
>>
>>> The MacPorts installer does add the MacPorts path to the MANPATH  
>>> for you
>>> in your .profile if MANPATH is not empty and does not already  
>>> contain the
>>> MacPorts manpath. Are you saying the MacPorts installer shouldn't do
>>> that?
>>
>> A (non-empty) MANPATH containing an empty path (i.e. a colon at the
>> beginning or at the end, or a "::" sequence) and not containing the
>> MacPorts manpath is correct, because the empty path will be replaced
>> by the default paths, that will normally be built using $PATH. The
>> user may have set up such a MANPATH, and if you modify it, this can
>> be wrong as you will change the path order.
>
> Okay, so now I'm thoroughly confused. OS X (10.5.5) reported  
> nothing when I did an 'echo $MANPATH'

Odd; on my 10.5.5 system it says:

$ echo $MANPATH
/usr/share/man:/usr/local/share/man:/usr/X11/man
$

> and wouldn't show me a man page for 'port'.

That is normal when the MANPATH is not empty and does not contain the  
MacPorts manpath.

> So, I added 'export MANPATH=/opt/local/share/man:$MANPATH' to  
> my .profile and now at least I can view manpages from macports. Is  
> there a proper way to pull this off?

That is the until-now recommended way. That is what the MacPorts  
installer is supposed to do for you.

> Macports 1.6.0 either didn't modify something it should have

There is a bug in the 1.6.0 installer that prevents this from working  
properly. It has been fixed in the source code which will become  
MacPorts 1.7.0. See:

http://trac.macports.org/wiki/ProblemHotlist#a.profilenotsetup

> or it is up to the user to add a MANPATH. If there are system  
> inconsistencies that might happen then that is bad too.

I'll have to evaluate Vincent's recommendation in this thread and see  
what the advantages and disadvantages would be of doing things the  
way he suggests instead.



More information about the macports-users mailing list