[blfs-dev] About MANPATH

Bruce Dubbs bruce.dubbs at gmail.com
Sun Jan 25 14:48:04 PST 2015


Fernando de Oliveira wrote:
> On 25-01-2015 08:30, Pierre Labastie wrote:
>> Hi,
>>
>> I do not know whether this happened to you, but I've been hit several times:
>> After installing some package in /opt, some "profile" file (for example
>> "extrapaths.sh") is modified to include:
>> -----------
>> pathappend /opt/some/thing/man MANPATH
>> -----------
>>
>> Then, man does not work anymore!
>
> Yes. Something like that happened to me. I have tried to fix sometimes.
>
>> The reason is:
>> - From "man man", we read (under the "-M" option):
>> ---------
>> By default, man uses manpath derived code to determine the path to search.
>> ---------
>> - From "man manpath", we read:
>> ---------
>> The colon-delimited path is determined using information gained from the
>> man-db configuration file - (/etc/manpath.config) and the user's environment.
>> [...]
>> If $MANPATH is set, manpath displays its value rather than determining  it on
>> the fly. If $MANPATH is prefixed by a colon, then the value of the variable is
>> appended to the list determined from the content of the configuration files.
>> If the colon comes at the end of the value in the variable, then the
>> determined list is appended to the content of the variable. If the value of
>> the variable contains a double colon (::), then the determined list is
>> inserted in the middle of the value, between the two colons.
>
>> Of those, only OpenJDK has a not satisfactory attempt to fix the above
>> problem: it is defeated as soon as antoher pathappend is done.
>>
>> For the "Going beyond BLFS" page, I am unsure whether a further explanation is
>> needed. But, may I change all the other occurrences with "pathprepend :/path
>> MANPATH"? I know somebody complained once that pathappend :/path would result
>> in an unpleasant looking MANPATH...
>
> IMHO, these changes seem desirable.

I believe this has been fixed in the book some time ago.  In 
extrapaths.sh we have:

# Set some defaults before other applications add to these paths.
pathappend /usr/share/man  MANPATH
pathappend /usr/share/info INFOPATH


I think the problem you see is because you haven't updated 
extrapaths.sh.  That is understandable as I have done that also when 
copying from an older build.

   -- Bruce




More information about the blfs-dev mailing list