Commit Graph

62 Commits

Author SHA1 Message Date
Xavier Delaruelle
c38228aa82 Remove '-' from list of ext dfl separator char
Remove the '-' character from the list of extended default separator
characters, as it is not feasible to determine in all cases the highest
version specified after this character (to determine an implicit
default). This removal means that only '.' is taken into account as
extended default separator.
2019-11-11 09:13:50 +01:00
Xavier Delaruelle
8638d5b5bb doc: desc extended_default in man/diff/INSTALL 2019-11-11 09:13:50 +01:00
Xavier Delaruelle
620701fe1f doc: search sub-cmd is always performed icase
Clarify on search sub-command that search query string is always matched
in a case insensitive manner.
2019-11-11 09:00:03 +01:00
Xavier Delaruelle
acf98ba389 doc: desc icase in man/diff/INSTALL
Fixes #212
2019-11-11 08:59:52 +01:00
Xavier Delaruelle
2094756d98 doc: fix typo in MODULES_SEARCH_MATCH section of module.1 2019-10-13 10:46:15 +02:00
Xavier Delaruelle
7cde306cc0 doc: desc wa_277 in man/diff/INSTALL 2019-09-16 20:45:04 +02:00
Xavier Delaruelle
efa8883bb8 Honor CLICOLOR/CLICOLOR_FORCE env var to set color mode
Add support for standard variables CLICOLOR and CLICOLOR_FORCE to define
color mode. Implement specification for these variables described at
https://bixense.com/clicolors/.

Fixes #279.
2019-07-26 08:32:16 +02:00
Xavier Delaruelle
f9329e0264 doc: desc verbosity in man/diff/INSTALL 2019-07-25 17:30:29 +02:00
Xavier Delaruelle
26b7c8e4c4 Set global RC file in @etcdir@ instead @prefix@/etc
Fix location of ``etc/rc`` global RC file to ``@etcdir@/rc`` instead of
``@prefix@/etc/rc`` to cope with ``@etcdir@`` specific setup (defaults
to ``@prefix@/etc``).
2019-07-09 06:43:05 +02:00
Xavier Delaruelle
df0698a53e doc: desc set_shell_startup in man/diff/INSTALL 2019-07-04 20:09:22 +02:00
Xavier Delaruelle
b3a8547997 doc: desc search_match in man/diff/INSTALL 2019-07-02 05:39:15 +02:00
Xavier Delaruelle
e5aa32eb2a Report locked config option value with a locked mention 2019-06-08 08:04:49 +02:00
Xavier Delaruelle
ae2c0045a8 Raise error when setting locked config option
Raise an error and exit if module 'config' sub-command attempts to
modify a configuration option which is locked.
2019-06-08 08:04:49 +02:00
Xavier Delaruelle
a665e6b8b4 install: enable implicit_default in locked_configs
Makes implicit_default configuration option lockable through
locked_configs option.
2019-06-08 08:04:49 +02:00
Xavier Delaruelle
1a52463b96 install: replaces --enable-extra-siteconfig with --with-locked-configs
Add to the configure script the --with-locked-configs option to ignore
environment variable superseding of Modules configurations defined in
modulecmd.tcl script. Lockable configuration option are extra_siteconfig.
Currently locked options are reported through the locked_configs option
on the config sub-command.

This new configure option replces --enable-extra-siteconfig which was
dedicated to the control over the MODULES_SITECONFIG variable.
2019-06-08 08:04:49 +02:00
Xavier Delaruelle
4df560d862 doc: clarify source sub-cmd in module.1 man
Talk about scriptfile on `source` sub-command rather modulefile to
clarify a bit usage.
2019-06-03 21:52:27 +02:00
Xavier Delaruelle
89fef8de6c doc: desc implicit_default in man/diff/INSTALL 2019-06-03 08:14:59 +02:00
Xavier Delaruelle
410fa99867 doc: desc unload_match_order in man/diff/INSTALL 2019-05-26 07:33:07 +02:00
Xavier Delaruelle
2579e7604f doc: desc config cmd in man module.1 2019-05-20 20:36:56 +02:00
Xavier Delaruelle
8f8b74398a Add ability to disallow MODULES_SITECONFIG
Add to the configure script the `--enable-extra-siteconfig` and
`--disable-extra-siteconfig` options to allow or forbid the definition
of a site-specific configuration script controlled with the
`MODULES_SITECONFIG` environment variable.

These options control the default value of the `g_extrasiteconfig`
variable in `modulecmd.tcl`. If this variable is true (by default),
MODULES_SITECONFIG is looked at the siteconfig sourcing time. Thus the
primary siteconfig.tcl can set the variable to false to ensure the
extra siteconfig is disabled whatever the option passed at ./configure
time.
2019-05-20 20:36:56 +02:00
Xavier Delaruelle
aa3edd7cc4 doc: desc. MODULECONTACT/MODULERCFILE in module.1 2019-05-15 20:53:33 +02:00
Xavier Delaruelle
00cd9599c6 doc: desc etcdir/siteconfig.tcl in FILES sect. of module.1 2019-05-09 07:28:13 +02:00
Xavier Delaruelle
ff883235f6 doc: desc. MODULERCFILE var in module.1 man page 2019-05-09 07:28:13 +02:00
Xavier Delaruelle
22495fd5cf adding documentation and tests for MODULES_SITECONFIG 2019-05-09 07:25:34 +02:00
Xavier Delaruelle
afa789fe62 Leverage --force cmd-line switch on 'clear' sub-cmd
Leverage --force command-line switch on 'clear' sub-command to skip
confirmation dialog.

Fixes #268.
2019-05-08 10:59:34 +02:00
Xavier Delaruelle
ddbdef78ad Re-introduce 'clear' sub-command
With same behavior than on compatibility version. The list of the
environmet variables that are cleared by this sub-command has been
updated to match the recent development (MODULES_LMPREREQ, ...)

Fixes #203.
2019-05-03 14:01:34 +02:00
Xavier Delaruelle
2e7d3ce6d6 doc: desc color mode in man/NEWS/INSTALL/MIGRATING 2019-05-03 14:01:22 +02:00
Xavier Delaruelle
cc6a1faae4 doc: desc avail in depth mode in man/NEWS/MIGRATING 2019-05-03 14:00:29 +02:00
Xavier Delaruelle
83d504fd7c doc: fix typo in Python init example in module man page 2018-12-10 21:54:27 +01:00
Xavier Delaruelle
10d8b84977 doc: desc. alt name in manpages and diff doc
Also fix some typos found on the way and clarifies commands where
symbolic versions and aliases where already supported.
2018-09-01 16:37:05 +02:00
Xavier Delaruelle
791e6bff8c doc: add DepUn + clarify UReqUn,DepRe
Especially regarding the inter-dependencies between these mechanisms and
the specificities of the switch sub-command.
2018-08-25 15:16:30 +02:00
Xavier Delaruelle
df0ccf3b48 Brand auto handling mechanisms
* Requirement Load (ReqLo)
* Dependent Reload (DepRe)
* Useless Requirement Unload (UReqUn)
* Dependent Unload (DepUn)

Mention these mechanism titles in MIGRATION and module man page
documentations.

Reword code and tests that where previously using the DU/DR/URU short
names.
2018-08-24 22:01:56 +02:00
Xavier Delaruelle
edcd9a1351 doc: desc. --force in module.1 2018-07-22 08:22:16 +02:00
Xavier Delaruelle
19f6f03d3c doc: desc. --auto/--no-auto/MODULES_AUTO_HANDLING in module.1 2018-07-22 08:22:16 +02:00
Xavier Delaruelle
e36ab552f0 doc: desc. MODULES_LM{CONFLICT,NOTUASKED,PREREQ} in module.1 2018-07-22 08:22:16 +02:00
Xavier Delaruelle
4783209975 Args should be passed as list not single string
Update documentation for module usage on scripting language like Perl or
Python to provide examples where arguments are passed as a list of
string rather a single string.

For compatibility with previously advertised examples, first argument is
splitted if multiple word are detected in it.
2018-05-15 20:53:29 +02:00
Xavier Delaruelle
468f16f9ec init: shield autoinit res from param expansion on sh-shells
Quote autoinit result for eval interpretation on SH-kind shells to
avoid parameter expansion to randomly occur on generated code
depending on file or directory names of current working directory.

Test basic module commands in install testsuite with a
'something (test)' file existing in current working directory.

Fixes bug reported at [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1549664
2018-03-01 19:15:44 +01:00
Xavier Delaruelle
b5a0820666 Ignore LESS env var for pager configuration
As for the PAGER environment variable, do not consider anymore the LESS
environment variable for Modules pager configuration in order to avoid
side effects coming from a general pager configuration not compatible
with Modules pager handling.

Previously when LESS was spotted defined, default paging command options
were blanked if default pager was 'less'. With this change, even if LESS
environment variable is defined, default paging command options are
still taken into account.

Adapt doc and tests accordingly.

Complements #146
2018-02-16 07:50:43 +01:00
Xavier Delaruelle
d4e3c6dc2e Ignore PAGER env var for pager configuration
Do not consider anymore the PAGER environment variable for Modules pager
configuration in order to avoid side effects coming from a general pager
configuration not compatible with Modules pager handling.

This change makes Modules pager implementation moving away from Git
pager implementation (which was taken as reference to model configuration
behavior of Modules pager). Git is able to withstand any pager
configuration, especially to quit pager if content fits in one screen.
Not the case with our implementation currently, so it is safer to only
take into account pager configuration that is specific to Modules.

Adapt doc and tests accordingly.

Fixes #146
2018-02-11 10:42:23 +01:00
Xavier Delaruelle
9c45a20bb2 doc: desc MODULES_CMD var and modulecmd wrapper 2018-01-04 07:15:37 +01:00
Xavier Delaruelle
8864cd19e1 doc: desc. variable ref support in MODULEPATH 2017-12-30 14:13:36 +01:00
Xavier Delaruelle
353b9d662c Introduce @etcdir@/siteconfig.tcl script
Add the possibility to setup a site-specific configuration Tcl script
which will be sourced at the start of modulecmd.tcl. This site-specific
Tcl script enables to supersede global variable and procedure definition
made in modulecmd.tcl. This way local adaptations can be made without
editing the modulecmd.tcl script.

'--etcdir' configure option is added to specify the location of the
site-specific configuration script.
2017-12-23 18:22:20 +01:00
Xavier Delaruelle
3fcc9b46e7 Add --index opt to remove-path
Remove path entry in environment variable by passing an index rather a
string. String at specified index in content list is removed if coherent
with relative reference counter.
2017-12-21 05:43:13 +01:00
Xavier Delaruelle
b2105b8834 Introduce --duplicates opt to {append,prepend}-path
Let the possibility to append or prepend path element entry to a
variable even if this entry is already registered into the variable
which introduces duplicates element within the variable value.

Entries are added with eventual duplication by the use of the
--duplicate option on append-path and prepend-path commands. These
additions increment the reference counter as usual.

Removal of duplicated path entry depends on the reference counter value.
Entries are not removed unless reference counter value is lesser than
the number of duplicated entries.
2017-12-19 21:34:52 +01:00
Xavier Delaruelle
8c4b3b745d Pass multi paths in multi strs on {append,prepend,remove}-path
Enable append-path, prepend-path and remove-path to receive multiple
path value arguments.

Add some non-regression tests for modulefile or sub-command cases.

Update modulefile.4 and module.1 docs.

Closes #141
2017-12-19 06:53:50 +01:00
Xavier Delaruelle
9dcc70165b Introduce MODULES_COLLECTION_PIN_VERSION
Add the ability to always record module name + version even if this
version corresponds to the default one.

By default, version number is omitted if it corresponds to the implicit
or explicitly set default version. If MODULES_COLLECTION_PIN_VERSION
environment variable is set to 1, version number is always recorded.

When restoring a collection, we do not know for sure if it was saved
with pinned versions or not, so module load and unload movements are
determined on both simplified or raw module list. Results with less
module to load or unload (means with more matches between module lists)
are kept.

Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.

Closes #89
2017-12-12 07:28:28 +01:00
Xavier Delaruelle
e2dbdbdaa5 doc: fix info-loaded section layout in module.1 2017-12-06 07:22:06 +01:00
Xavier Delaruelle
73456fea04 Handle no argument case on 'is-used'
Returns true when no argument is passed to 'is-used' if any directory
is used, whatever it is.

Adapt docs and test cases to this new behavior.

Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.

Closes #144
2017-12-01 15:47:23 +01:00
Xavier Delaruelle
ec305b5296 Handle no argument case on 'is-saved'
Returns true when no argument is passed to 'is-saved' if any collection
matching currently set collection target exists whatever this collection
is.

Adapt docs and test cases to this new behavior.

Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
2017-12-01 15:46:47 +01:00
Xavier Delaruelle
ea7e9a7792 Handle no argument case on 'is-loaded'
Returns true when no argument is passed to 'is-loaded' if any modulefile
is loaded, whatever it is.

Adapt docs and test cases to this new behavior.

Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
2017-12-01 15:45:42 +01:00