[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(info browser) Should any default directories be used when INFOPATH is s
From: |
Gavin Smith |
Subject: |
(info browser) Should any default directories be used when INFOPATH is set? |
Date: |
Thu, 3 Apr 2014 01:55:19 +0100 |
I have been working on setting up a test framework for the info
browser. I would like to have a self-contained set of info files which
the program can read, without any interference from any which have
already been installed (under, e.g., /usr/share/info or
/usr/local/share/info).
Placing a stub dir file in the directory t/infodir, I run:
INFOPATH=t/infodir/ ./ginfo
However, this merges two dir files, and the stub one I wrote.
This would seem to contradict the manual:
Invoking Info
'--directory DIRECTORY-PATH'
'-d DIRECTORY-PATH'
Prepend DIRECTORY-PATH to the list of directory paths searched when
Info needs to find a file. You may issue '--directory' multiple
times; once for each directory which contains Info files, or with a
list of such directories separated by a colon (or semicolon on
MS-DOS/MS-Windows). In the absence of '--directory' options the
list of directories searched by Info is constructed from the value
of the environment variable 'INFOPATH'. The value of 'INFOPATH' is
a list of directories usually separated by a colon; on
MS-DOS/MS-Windows systems, the semicolon is used. If you do not
define 'INFOPATH', Info uses a default path defined when Info was
built as the initial list of directories. If the value of
'INFOPATH' ends with a colon (or semicolon on MS-DOS/MS-Windows),
the initial list of directories is constructed by appending the
build-time default to the value of 'INFOPATH'.
My reading of this is that no extra default search directories are
used when INFOPATH is set. Unless there's a good reason for it, I
propose to stop info doing this.
It happens in infopath_init() in infopath.c:
#ifdef INFODIR /* from the Makefile */
infopath_add (INFODIR, INFOPATH_PREPEND);
#endif
INFODIR (and INFODIR2) are set with -D flags in Makefile.am.
- (info browser) Should any default directories be used when INFOPATH is set?,
Gavin Smith <=