From c0083889c82cbd619c7411de9b710c3c892692f9 Mon Sep 17 00:00:00 2001 From: Alexander Konovalov Date: Sat, 4 Nov 2017 16:46:33 +0000 Subject: [PATCH] Removed provisional code for coexisting data libs and packages PR #1714 added some code needed to load either a new package for a data library, if present, or load the existing prim, small or trans directory otherwise. This code is not needed any more, since we remove prim, trans, and small directories. Also make PrimGrp, SmallGrp and TransGrp packages needed to run GAP. This ensures that a proper error message will be displayed in case any of these packages is missing. --- hpcgap/lib/package.gi | 19 ------------- hpcgap/lib/system.g | 5 ++++ lib/package.gi | 13 --------- lib/read.g | 64 ------------------------------------------- lib/system.g | 8 ++++-- 5 files changed, 10 insertions(+), 99 deletions(-) diff --git a/hpcgap/lib/package.gi b/hpcgap/lib/package.gi index de55f0e6f19..321c73576fb 100644 --- a/hpcgap/lib/package.gi +++ b/hpcgap/lib/package.gi @@ -1819,25 +1819,6 @@ BindGlobal( "BANNER", false ); GAPInfo.delayedImplementationParts:= []; - # Ensure GAP loads PrimGrp, SmallGrp and TransGrp packages - # To be migrated to lib/system.g after the replacement of - # prim, small and trans directories by these packages - if TestPackageAvailability("primgrp") <> fail then - GAPInfo.Dependencies.NeededOtherPackages := - `Concatenation( ShallowCopy(GAPInfo.Dependencies.NeededOtherPackages), - [ [ "primgrp", ">= 3.1.0" ] ]); - fi; - if TestPackageAvailability("smallgrp") <> fail then - GAPInfo.Dependencies.NeededOtherPackages := - `Concatenation( ShallowCopy(GAPInfo.Dependencies.NeededOtherPackages), - [ [ "smallgrp", ">= 1.0" ] ]); - fi; - if TestPackageAvailability("transgrp") <> fail then - GAPInfo.Dependencies.NeededOtherPackages := - `Concatenation( ShallowCopy(GAPInfo.Dependencies.NeededOtherPackages), - [ [ "transgrp", ">= 1.0" ] ]); - fi; - # Load the needed other packages (suppressing banners) # that are not yet loaded. if ForAny( GAPInfo.Dependencies.NeededOtherPackages, diff --git a/hpcgap/lib/system.g b/hpcgap/lib/system.g index 347ce8d00a8..010ae3e1646 100644 --- a/hpcgap/lib/system.g +++ b/hpcgap/lib/system.g @@ -30,8 +30,13 @@ BIND_GLOBAL( "GAPInfo", AtomicRecord(rec( Dependencies := rec( NeededOtherPackages := `[ [ "gapdoc", ">= 1.2" ], + [ "primgrp", ">= 3.1.0" ], + [ "smallgrp", ">= 1.0" ], + [ "transgrp", ">= 1.0" ], ], ), +# There is no SuggestedOtherPackages here because the default value of +# the user preference PackagesToLoad does the job HasReadGAPRC:= false, diff --git a/lib/package.gi b/lib/package.gi index 1df3a747fcf..9db68883870 100644 --- a/lib/package.gi +++ b/lib/package.gi @@ -1814,19 +1814,6 @@ BindGlobal( "BANNER", false ); GAPInfo.delayedImplementationParts:= []; - # Ensure GAP loads PrimGrp, SmallGrp and TransGrp packages - # To be migrated to lib/system.g after the replacement of - # prim, small and trans directories by these packages - if TestPackageAvailability("primgrp") <> fail then - Add( GAPInfo.Dependencies.NeededOtherPackages, [ "primgrp", ">= 3.1.0" ] ); - fi; - if TestPackageAvailability("smallgrp") <> fail then - Add( GAPInfo.Dependencies.NeededOtherPackages, [ "smallgrp", ">= 1.0" ] ); - fi; - if TestPackageAvailability("transgrp") <> fail then - Add( GAPInfo.Dependencies.NeededOtherPackages, [ "transgrp", ">= 1.0" ] ); - fi; - # Load the needed other packages (suppressing banners) # that are not yet loaded. if ForAny( GAPInfo.Dependencies.NeededOtherPackages, diff --git a/lib/read.g b/lib/read.g index 007145b3212..bd2b203ecae 100644 --- a/lib/read.g +++ b/lib/read.g @@ -10,70 +10,6 @@ ReadOrComplete( "lib/read7.g" ); # character theory stuff ReadOrComplete( "lib/read8.g" ); # overloaded operations, compiler interface ReadLib( "colorprompt.g" ); - -############################################################################# -## -## Load data libraries -## The data libraries which may be absent cannot be completed, therefore -## they must be read in here! - -############################################################################# -## -#X Read library of groups of small order -#X Read identification routine -## -if TestPackageAvailability("smallgrp")=fail then - ReadSmall( "readsml.g","small groups" ); -fi; - -############################################################################# -## -#X Checking transitive groups library -## -## Assign TransitiveGroupsAvailable to a dummy function to make it -## callable, even if the library is unavailable. -if TestPackageAvailability("transgrp")=fail then - InstallGlobalFunction(TransitiveGroupsAvailable,deg->false); -fi; - -# Only load component if not available as package -# (to be removed together with the `trans` directory) -if TestPackageAvailability("transgrp")=fail then - TRANS_AVAILABLE:=ReadTrans( "trans.gd","transitive groups" ); - TRANS_AVAILABLE:= TRANS_AVAILABLE and ReadTrans( "trans.grp", - "transitive groups" ); - TRANS_AVAILABLE:= TRANS_AVAILABLE and ReadTrans( "trans.gi", - "transitive groups" ); -fi; - -############################################################################# -## -#X Checking primitive groups library -## -## Assign PrimitiveGroupsAvailable to a dummy function to make it -## callable, even if the library is unavailable. -if TestPackageAvailability("primgrp")=fail then - InstallGlobalFunction(PrimitiveGroupsAvailable,deg->false); -fi; - -# Only load component if not available as package -# (to be removed together with the `prim` directory) -if TestPackageAvailability("primgrp")=fail then - PRIM_AVAILABLE:=ReadPrim( "primitiv.gd","primitive groups" ); - PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "irredsol.gd","irreducible solvable groups" ); - PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "primitiv.grp", - "primitive groups" ); - PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "primitiv.gi", - "primitive groups" ); - - PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "irredsol.grp", - "irreducible solvable groups" ); - PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "irredsol.gi", - "irreducible solvable groups" ); - PRIM_AVAILABLE:=PRIM_AVAILABLE and ReadPrim( "cohorts.grp", - "irreducible solvable groups" ); -fi; - ############################################################################# ## #E diff --git a/lib/system.g b/lib/system.g index a594fd1100f..120a3397661 100644 --- a/lib/system.g +++ b/lib/system.g @@ -30,11 +30,13 @@ BIND_GLOBAL( "GAPInfo", rec( Dependencies := rec( NeededOtherPackages := [ [ "gapdoc", ">= 1.2" ], + [ "primgrp", ">= 3.1.0" ], + [ "smallgrp", ">= 1.0" ], + [ "transgrp", ">= 1.0" ], ], ), - # There is no SuggestedOtherPackages here because the default value of - # the user preference PackagesToLoad does the job - +# There is no SuggestedOtherPackages here because the default value of +# the user preference PackagesToLoad does the job HasReadGAPRC:= false,