9.2 GAP Root Directory

When starting GAP it is possible to specify various directories as root directories. In GAP's view of the world these directories are merged into one meta-directory. This directory is called GAP root directory in the following.

For example, if ``root1;root2;...'' is passed as argument to ``-l'' when GAP is started and GAP wants to locate a file ``lib/group.gd'' in the GAP root directory it will first check if the file exists in root1, if not, it checks root2, and so on.

This layout makes it possible to have one system-wide installation of GAP which is read-only but still allows users to modify individual files. Therefore instead of constructing an absolute path name to a file you should always use DirectoriesLibrary or DirectoriesPackageLibrary together with Filename to construct a filename for a file in the GAP root directory.

Example

Assume that the system-wide installation lives in ``/usr/local/lib/gap4'' and you want to modify the file ``lib/files.gd'' without disturbing the system installation.

In this case create a new directory ``/home/myhome/gap'' containing a subdirectory ``lib'' which contains the modified ``lib/files.gd''.

The directory/file structure now looks like

/usr/local/lib/gap4/
/usr/local/lib/gap4/lib/
/usr/local/lib/gap4/lib/files.gd
/home/myhome/gap/
/home/myhome/gap/lib
/home/myhome/gap/lib/files.gd

If you start GAP using (under UNIX)

you@unix> gap -l '/home/myhome/gap;/usr/local/lib/gap4'

then the file ``/home/myhome/gap/lib/files.gd'' will be used whenever GAP references the file with filename ``lib/files.gd'' in the GAP root directory.

This setup also allows one to easily install new share packages or bugfixes even if no access to the system GAP installation is possible. Simply unpack the files into ``/home/myhome/gap''.

[Top] [Previous] [Up] [Next] [Index]

GAP 4 manual
February 2000