[blfs-dev] About MANPATH

Fernando de Oliveira famobr at yahoo.com.br
Sun Jan 25 04:10:41 PST 2015


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.

-- 
[]s,
Fernando


More information about the blfs-dev mailing list