When saving current loaded prereq and conflict through MODULES_LMPREREQ
and MODULES_LMCONFLICT environment variable, translate version range
specifier `:` into `<` character to distinguish it from path separator
character.
A range of version may be specified after '@' with the help of ':'
character to express *greater or equal* (ex: `1.2:`), *lower or equal*
(ex: `:1.2`) or *between or equal* (ex: `1.1:1.2`) conditions.
Adapt procedures that parse module version specifier or compare module
version. Error is raised if version specified for range are not versions
or higher version is lower than lower version.
Non 'xdigit' character in higher part of version number is considered as
a non version number. It avoids symbols like `default`, `new` and so on
to get in the version range way.
Conflict defined with a generic module name or an advanced version
specifier may match multiple loaded modules (generally in case multiple
loaded modules share same root name). Loaded environment analysis has
been fixed to bound conflict to all loaded modules matching it. As a
result the dependent reload mechanism is not triggered when one
loaded module matching conflict is removed if another loaded module
still match the conflict.
Rework whole isModuleEvaluated procedure to check all names of loaded or
loadind module attempt against module version specifiers passed as
argument.
Add the 'exclmod' argument to the procedure to exclude from tested list
the currently evaluated module: avoid this way detecting self on
reflexive conflict definition.
As a result just loaded or currently loading conflicting modules are
better detected when conflict is expressed against an alias name or a
module generic name.
When query's module contains globbing wildcard characters (? or *)
adapt extended default match test to use an escaped version of module
designation when modEq is called for an equal test.
Call modEq to check mod name passed matches array elements, so
arrayKeyMatch procedure does not need to be specialized to match icase
and extended_default setup, which is now deleguated to modEq.
When query's module name contains globbing wildcard characters (? or *)
adapt test to check module names match and then extract module version
in modEq.
A list of version may be specified after '@' by joining the multiple
versions to set with the ',' character (ex: @1.2,1.3).
Parse this syntax and store version specification information in
parseModuleVersionSpecifier procedure and adapt procedures that handle
the version specification information like getOneModuleFromVersSpec and
getAllModuleFromVersSpec.
Change internal storage structure to hold module version specifier with
4 fields: complete module name version, module name, version comparison
set, and module version.
Change getModuleVersSpec procedure into getModuleFromVersSpec to extract
just specified module (name and version) from module name and version
specifier.
Add a getAllModulesFromVersSpec procedure that parses module name
version specification to return a list of all the module mentionned in
specification.
Use this new helper procedure in isModuleSpecHidden to check if one
module from returned list is an hidden module.
Define the module name and version comparison procedures at the
beginning of the getModules procedure so it is not needed to define the
modMatch procedure in findModules as findModules is only called by
getModules.
Add a 'test' argument to modEq procedure to only check if passed
module name matches pattern on pattern length when it equals to
'eqstart'. So modStartEq procedure is not needed anymore, calls are
replaced with [modEq $pattern $mod eqstart].
Call modStartEq to check full name passed in modStartNb, so modStartNb
does not need to handle the extended_default check which is then
deleguated to modStartEq.
Introduce getModuleNameFromVersSpec to extract module name from module
name version specification.
Translate module name version specification in getPathToModule to
extract one module version name from it. Use that to determine the
module name root to find.
Translate module name version specification in listModules to extract
one module version name from it. Use that to determine the no-indepth
search properties.
Translate module name version specification in getModules to extract one
module version name from it. Use that to determine the module name root
to find and no-indepth search properties.
Pass the module version specification toward modMatch procedure to
translate it there for module matching. modMatch procedure is adapted to
apply the translation only if a 'trspec' argument is set to 1.
A pattern suffix 'psuf' argument is also added to give the ability to
append a suffix string to translated module name version.
Introduce the isModuleSpecHidden procedure to pass it the module version
specification which is there translated to check if corresponding module
names are hidden or not.
Pass the module version specification toward modMatchAtDepth to
translate it there for module matching.
Also pass the 'contains' mode toward this procedure to adapt module name
version once translated.
Check 2 module names are equal with a dedicated proc called 'modEq' that
translates one name argument against recorded module version specifiers.
Use this procedure in cmdModuleSearch, thus this procedure does not need
to translate module name it receives against recorded module version
specifiers.
Also use modEq for a comparison in getModules procedure.