Debian-Project - Release Goals for Version 2.1
Support for MANPATH and INFOPATH
This has been proposed by Michael Bramer.All programs that display manpages shall use MANPATH and /etc/manpath.config to find the relevant manpages. All programs that display infopages shall use INFOPATH.
With a little patch, this should no problem.
Antti-Juhani Kaijanaho writes:
I believe the correct way of doing this would be to build a small library for handling generic path-searching. This lib is then used by *all* man page browsers and info readers. Possibly other classes of software will find the library beneficial, too. The library would have a config file and it would naturally react to MANPATH, INFOPATH and other such environment variables. Functionality-wise this is very close to the kpathsea library included with teTeX. In fact, kpathsea could possibly be modified to implement this. Advantages of this approach:
- A simple library that a developer can use to bring in complex path searching
- A single config file for man, info and possibly other things too makes future transitions like this one easier - and it's easier for the sysadmin too.
Buddha Buck writes:
I think that a series of library functions that searched a path parameter would be a good start. Something like:
SYNOPSIS
char *findpath(char* filename, char* path)
DESCRIPTION
findpath attempts to locate a file in a directory within a
colon-separated path. If the filename is not an absolute
pathname, will search each directory in the path, in an manner
similar to the method the shell uses when searching the PATH
variable for an executable, and will return the full pathname of
the first matching file found. If the filename is an absolute
pathname, the path parameter is ignored, and findpath will just
check for the existance of the file. If the file cannot be
found, findpath will return NULL.
This could be used by anything needing to search a man path, an info path, an ld path, etc, etc, etc. I -think- I could code it up fairly simply, but I don't know what to do after that! Would the debian-mentor list be a good one for me to subscribe to if I want to do this?
Joel Klecker says:
AFAIK, /etc/manpath.config is a conffile for man-db, it should not and will not be used by portable programs.
Yann Dirson comments:
I don't think directly accessing /etc/manpath.config is a good idea. I guess that other man packages (is man-aeb still around ?) do not use it, as most other man packages for other unices. We should first verify if using the `manpath' utility is not more portable.