Fix interpreter variable reset between multiple modulefile or modulerc
evaluations when variable initial value is an invalid list.
Fixes#570
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
Do not add Modules issue report web link when facing a "resource
temporarily unavailable" error when forking sub-process like logger or
pager.
Fixes#546
Remove coverage test for the moment. CI Darwin environment (image sonoma
on Cirrus CI platform) requires injected library to be built for arm64e
architecture, however current environment build arm64 content, not
arm64e.
Revert use of getgrouplist C function instead of getgroups. getgrouplist
returns a result different than the one obtained with "id" command on
some OSes (FreeBSD, Cygwin, MSYS).
Stay with getgroups for the moment, as it is still the standard way
(POSIX.1-2008) to retrieve user groups.
Update Envmodules_InitStateUsergroupsObjCmd to rely on getgrouplist C
function rather getgroups. getgrouplist seems to be a more modern
function to get user's groups. It automatically includes primary group
if not part of supplementary groups. No duplicate result are returned.
Update Envmodules_InitStateUsergroupsObjCmd to make a first dummy call
to "getgroups" function in order to retrieve the number of groups and
then be able to allocate the right array size.
With such change, our function does not rely anymore on sysconf function
and on NGROUPS_MAX and DEFAULT_MAXGROUPS defines.
Update configuration option definition array (g_config_defs) to add
value kind attribute as 4th entry in definition list. This attribute has
following possible values: 'i' for integer, 's' for string, 'b' for
boolean, 'l' for colon-separated list, 'o' for other.
Update module specification parsing mechanism to add a getavails
argument. It indicates that available modules matching spec should be
searched in enabled modulepaths to record them in module version
specification structure.
When searching for available matching modules, disable extra match
search to avoid an infinite resolution loop.
Extra specification in module search query is only allowed on search
sub-commands (avail, paths, whatis). An error is raised when parsing a
module specification if it contains an extra specification on a
non-search context.
xtspec argument is added to parseModuleSpecification procedure to know
if extra specification is allowed or not.
Update getDiffBetweenArray procedure to add notset_equals_empty argument
(disabled by default). When enabled not-set element in array is
equivalent to element set to an empty value.
Correct source-sh tests in 50/400 to succeed when tests are run in an
environment where module is defined but has been uninstalled. It
corresponds to the environment created for 'mrel' script execution.
Add an utility library that supersedes the sysconf function from libc.
The sysconf function from this added library always returns an error
(-1). It is used for coverage test of the sysconf call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
Remove entirely the work on the noglob_eval_shells option as enclosing
in quotes the generated output of modulecmd.tcl to pass it to the eval
command is equivalent to disable the pathname expansion mechanism of
sh-kind shells.