Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,10 @@ InstallGlobalFunction( LoadPackage, function( arg )
if not IsBound( GAPInfo.PackagesInfo.( name ) ) then
LogPackageLoadingMessage( PACKAGE_DEBUG,
"no package with this name is installed, return 'fail'", name );
if InfoLevel(InfoPackageLoading) < 4 then
Info(InfoWarning,1, name, " package is not available. Check that the name is correct");
Info(InfoWarning,1, "and it is present in one of the GAP root directories (see '??RootPaths')");
fi;
return fail;
fi;

Expand Down Expand Up @@ -1485,6 +1489,12 @@ InstallGlobalFunction( LoadPackage, function( arg )
else
LogPackageLoadingMessage( PACKAGE_DEBUG,
"return from LoadPackage, package is not available", Name );
if banner then
if InfoLevel(InfoPackageLoading) < 4 then
Info(InfoWarning,1, Name, " package is not available. To see further details, enter");
Info(InfoWarning,1, "SetInfoLevel(InfoPackageLoading,4); and try to load the package again.");
fi;
fi;
fi;
GAPInfo.LoadPackageLevel:= GAPInfo.LoadPackageLevel - 1;
return path;
Expand Down
2 changes: 1 addition & 1 deletion tst/teststandard/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2855,7 +2855,7 @@ gap> if LoadPackage("tomlib", false) <> fail then
# Tests requiring CTblLib

# 2005/08/29 (TB)
gap> LoadPackage("ctbllib", "=0.0");
gap> LoadPackage("ctbllib", "=0.0",false);
fail

## Bug 18 for fix 4
Expand Down