diff --git a/lib/package.gd b/lib/package.gd
index 586f7b27d2..f9215f4868 100644
--- a/lib/package.gd
+++ b/lib/package.gd
@@ -538,33 +538,31 @@ DeclareGlobalFunction( "DefaultPackageBannerString" );
##
##
## GAPInfo.Architecture
-## returns a list of the bin/architecture subdirectories
-## of all packages name where architecture is the architecture
-## on which ⪆ has been compiled
-## (this can be accessed as GAPInfo.Architecture,
-## see )
-## and the version of the installed package coincides with
-## the version of the package name that is already loaded
+## returns a list that is either empty or contains one directory object
+## dir, say, that describes the place where external binaries of the
+## ⪆ package name should be located.
+##
+## In the latter case,
+## dir is the bin/architecture subdirectory of a
+## directory where the package name is installed,
+## where architecture is the architecture on which ⪆ has been
+## compiled (this can be accessed as GAPInfo.Architecture,
+## see ),
+## and where the package directory belongs to the version of name
+## that is already loaded
## or is currently going to be loaded
## or would be the first version ⪆ would try to load if no other version
## is explicitly prescribed.
## (If the package name is not yet loaded then we cannot guarantee
-## that the returned directories belong to a version that really can be
-## loaded.)
+## that the directory belongs to a version that really can be loaded.)
##
## Note that is likely to be called
## in the AvailabilityTest function in the package's
## PackageInfo.g file (see ).
##
-## The directories returned by
-## are the place where external binaries of the ⪆ package name
-## for the current package version and the current architecture
-## should be located.
-##
## DirectoriesPackagePrograms( "nq" );
-## [ dir("/home/gap/4.0/pkg/nq/bin/x86_64-unknown-linux-gnu-gcc/64-bit/"),
-## dir("/home/gap/4.0/pkg/nq/bin/x86_64-unknown-linux-gnu-gcc/") ]
+## [ dir("/home/gap/4.0/pkg/nq/bin/x86_64-pc-linux-gnu-default64-kv3/") ]
## ]]>
##
##
@@ -583,21 +581,21 @@ DeclareGlobalFunction( "DirectoriesPackagePrograms" );
##
##
## takes the string name, a name of a ⪆ package,
-## and returns a list of directory objects for those sub-directory/ies
-## containing the library functions of this ⪆ package,
-## for the version that is already loaded
+## and returns a list that is either empty or contains one directory object
+## dir, say, that describes the place where the library functions of
+## this ⪆ package should be located.
+##
+## In the latter case,
+## dir is the path subdirectory of a
+## directory where the package name is installed,
+## where the default for path is "lib",
+## and where the package directory belongs to the version of name
+## that is already loaded
## or is currently going to be loaded
## or would be the first version ⪆ would try to load if no other version
## is explicitly prescribed.
## (If the package name is not yet loaded then we cannot guarantee
-## that the returned directories belong to a version that really can be
-## loaded.)
-##
-## The default is that the library functions are in the subdirectory
-## lib of the ⪆ package's home directory.
-## If this is not the case, then the second argument path needs to be
-## present and must be a string that is a path name relative to the home
-## directory of the ⪆ package with name name.
+## that the directory belongs to a version that really can be loaded.)
##
## Note that is likely to be called
## in the AvailabilityTest function in the package's
diff --git a/lib/package.gi b/lib/package.gi
index b5b18ca4da..acb1724301 100644
--- a/lib/package.gi
+++ b/lib/package.gi
@@ -1189,26 +1189,26 @@ InstallGlobalFunction( DefaultPackageBannerString, function( inforec )
#F DirectoriesPackagePrograms( )
##
InstallGlobalFunction( DirectoriesPackagePrograms, function( name )
- local info, ppath;
+ local info, installationpath;
# We are not allowed to call
# `InstalledPackageVersion', `TestPackageAvailability' etc.
info:= PackageInfo( name );
if IsBound( GAPInfo.PackagesLoaded.( name ) ) then
# The package is already loaded.
- ppath:= GAPInfo.PackagesLoaded.( name )[1];
+ installationpath:= GAPInfo.PackagesLoaded.( name )[1];
elif IsBound( GAPInfo.PackageCurrent ) then
# The package is currently going to be loaded.
- ppath:= GAPInfo.PackageCurrent.InstallationPath;
+ installationpath:= GAPInfo.PackageCurrent.InstallationPath;
elif 0 < Length( info ) then
# Take the installed package with the highest version
# that has been found first in the root paths.
- ppath:= info[1].InstallationPath;
+ installationpath:= info[1].InstallationPath;
else
# This package is not known.
return [];
fi;
- return [ Directory( Concatenation( ppath, "/bin/",
+ return [ Directory( Concatenation( installationpath, "/bin/",
GAPInfo.Architecture, "/" ) ) ];
end );
@@ -1218,7 +1218,7 @@ end );
#F DirectoriesPackageLibrary( [, ] )
##
InstallGlobalFunction( DirectoriesPackageLibrary, function( arg )
- local name, path, info, ppath, tmp;
+ local name, path, info, installationpath, tmp;
if IsEmpty(arg) or 2 < Length(arg) then
Error( "usage: DirectoriesPackageLibrary( [, ] )" );
@@ -1240,19 +1240,19 @@ InstallGlobalFunction( DirectoriesPackageLibrary, function( arg )
info:= PackageInfo( name );
if IsBound( GAPInfo.PackagesLoaded.( name ) ) then
# The package is already loaded.
- ppath:= GAPInfo.PackagesLoaded.( name )[1];
+ installationpath:= GAPInfo.PackagesLoaded.( name )[1];
elif IsBound( GAPInfo.PackageCurrent ) then
# The package is currently going to be loaded.
- ppath:= GAPInfo.PackageCurrent.InstallationPath;
+ installationpath:= GAPInfo.PackageCurrent.InstallationPath;
elif 0 < Length( info ) then
# Take the installed package with the highest version
# that has been found first in the root paths.
- ppath:= info[1].InstallationPath;
+ installationpath:= info[1].InstallationPath;
else
# This package is not known.
return [];
fi;
- tmp:= Concatenation( ppath, "/", path );
+ tmp:= Concatenation( installationpath, "/", path );
if IsDirectoryPath( tmp ) = true then
return [ Directory( tmp ) ];
fi;