Commit Graph

219 Commits

Author SHA1 Message Date
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
965b090bf1 doc: desc color mode in diff_v3_v4 2019-05-03 14:01:22 +02:00
Xavier Delaruelle
2e7d3ce6d6 doc: desc color mode in man/NEWS/INSTALL/MIGRATING 2019-05-03 14:01:22 +02:00
Xavier Delaruelle
01bb8e29f1 doc: desc avail in depth mode in diff_v3_v4 2019-05-03 14:00:29 +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
1c76c55e0a doc: desc Modulepath rc file in man/NEWS/MIGRATING 2019-04-30 08:12:47 +02:00
Xavier Delaruelle
846f95108f Report auto mech warn/err to top level message block
During an additional evaluation triggered by an automated module
handling mechanism, ensure warning and error messages are reported under
the message block of the main evaluation.

Add a 'recordtop' argument to the reportWarning and reportError
procedures in order to indicate that the message should be recorded
under the top-level message block instead of the currently active
message block.

Fixes #252.
2019-04-21 19:11:34 +02:00
Xavier Delaruelle
f9573569a1 doc: improve code that disable smart quotes
With contribution from @volans- for the Sphinx version test code.
2019-04-07 20:39:36 +02:00
Xavier Delaruelle
bc3b88b064 doc: preserve quotes and dashes when making html docs
Restrain Sphinx from converting quotes and dashes to lang-specific
entities with either the html_use_smartypants or smartquotes options.

Fixes #250
2019-04-07 10:16:17 +02:00
Xavier Delaruelle
c15785234b install: fix CONTRIBUTING guide build and install 2019-03-23 06:57:05 +01:00
Xavier Delaruelle
9f638b8118 doc: add example modulefiles for 'flavored-modules' recipe 2019-03-16 15:31:35 +01:00
Xavier Delaruelle
4e432320e5 doc: mention author of modulefiles-in-git examples 2019-02-25 10:54:32 +01:00
Scott Johnson
ac0a3f7bb5 New cookbook entry for versioning Modulefiles with Git
Originally developed at:
https://github.com/scottj97/environment-modules-in-git
2019-02-25 10:54:32 +01:00
Xavier Delaruelle
f8f15dec1b New year (2019) copyright mention update 2019-01-12 09:34:07 +01:00
Xavier Delaruelle
4d9ab6f9be doc: add a FAQ entry to desc. use of module from Makefile
Thanks to Robert McLay for the hint.
2018-12-10 21:54:27 +01: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
9a3da40597 doc: add CONTRIBUTING guide 2018-11-20 21:46:08 +01:00
Xavier Delaruelle
8c9df050f9 doc: introduce cookbook
Add a cookbook section in the documentation and port there the 3
pre-existing recipes: inhibit-report-info, top-priority-values and
unload-firstly-loaded.

Move the examples files of these recipes from contrib/cookbook to
doc/example directory.
2018-11-19 04:02:06 +01:00
Xavier Delaruelle
2a3b57fca5 Enable 'is-loaded' for modulerc eval
Make 'is-loaded' modulefile command callable from a modulerc
interpretation. Restore this way the behavior of compatibility version.

Update diff doc and add some specific non-regression tests in 20/060 and
50/380.

Fixes #207
2018-11-01 10:07:31 +01:00
Xavier Delaruelle
20aada54aa Fix 'system' to run cmd through shell
system modulefile command is intended to the command passed to it trough
shell, like done on compatibility version.

So update system procedure to find correct shell on the current platform
and run command through it.

Doing so, shell commands with backticks for instance are correctly run.

Fixes #205
2018-10-20 19:51:31 +02:00
Ben Bowers
3dc5ecee89 added set-function and unset-function commands
fixed linelength and tabs/spaces

adding set-function/unset-function documentation

adding tests for set-function/unset-function

fixed failing test for function modulefile additions
2018-10-17 09:45:33 +02:00
Xavier Delaruelle
1c5e21363f doc: desc. unload diff when multiple loaded mods match
Helpful for #198
2018-09-29 16:17:20 +02:00
Xavier Delaruelle
0220f81898 Only look at loaded modules when unloading
Adapt getPathToModule procedure to only look at the loaded module list
when searching a module to unload. If passed module not found in this
situation does not produce an "Unable to locate modulefile" issue.

So unloading an unexistent modulefile does not produce an error anymore,
as it was the case on compatibility version.

Moreover switching from an unexistent modulefile to another modulefile
does not produce the "Unable to locate modulefile" error and new module
load is attempted. Compatibility version does not walk in this situation
as on this version module to unload must be loaded elsewhere an error is
triggered.

Adapt testsuite and diff document.

Fixes #199
2018-09-29 16:14:37 +02:00
Xavier Delaruelle
702f6f1816 Check version set in modulefile magic cookie
Magic cookie at the beginning of modulefiles may sometimes set a version
number, for instance '#Module1.0'. Until now this version number was
about a modulefile standard version. However there is no known
modulefile API versioning and new modulefile commands are added along
new Modules releases.

So the idea here is to match this version number optionally set on magic
cookie and compare it to the modulecmd.tcl release version. If
modulefile sets a version number greater than modulecmd.tcl version,
this modulefile is not evaluated like when no magic cookie is set at
all.

Add specific tests in 20-locate suite and adapt modulefile man page and
MIGRATING doc.

Fixes #171
2018-09-08 19:10:38 +02: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
1c8b6af574 doc: mention createmodule.{sh,py} scripts in FAQ
Fixes #189
2018-08-23 21:49:08 +02:00
Xavier Delaruelle
00518d7171 ModulesVersion can only refer to modfile in same dir
Clarify modulefile man page and .version modulerc interpretation about
ModulesVersion variable which can only refer to modulefile located in
the same directory than where this .version modulerc file is located.

Report error if a nested ModulesVersion value is detected. This value is
ignored.

Add tests in 80-deep suite on that change.

Clarifies RH#979787 [1]

Fixes #176

[1] https://bugzilla.redhat.com/show_bug.cgi?id=979787
2018-08-20 08:11:13 +02:00
Colin Marquardt
83abfd0f64 Fix small typo. 2018-07-29 09:41:48 +02:00
Xavier Delaruelle
a50a6495e3 doc: desc. conflict& prereq consistency/auto/force in diff 2018-07-22 08:22:16 +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
2f541246cc doc: state in modulefile(4) getenv should be pref. over ::env 2018-07-02 07:00:57 +02:00
Xavier Delaruelle
409c16eb2a doc: env var definition during a whatis mode eval 2018-05-25 05:37:54 +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
d98bf28e25 doc: remove-path applied when unloading on compat vers 2018-04-17 10:29:59 +02:00
Xavier Delaruelle
d1cf08ba14 doc: desc. MANPATH special treatment on compat version
Describe the difference behavior between Modules 4+ and compatibility
version regarding how append-path/prepend-path commands handle the
MANPATH environment variable when unset. Helps clarify [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1564899
2018-04-17 10:17:32 +02:00
Xavier Delaruelle
2e8fed2b28 Add valifundef arg to getenv procedure
Allow to define value to return if variable name passed to the getenv
procedure is undef.

Add a description of 'getenv' command in the modulefile man page.
2018-04-16 07:54:52 +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
474814cbb1 install: give ability to install without doc built
If no sphinx-build found, warn user but still make it possible to build
and install Modules (without the documentation).

Enables to install Modules from git repository for test purpose on
systems where python-sphinx is not available in regular pakage
repositories.
2018-01-24 08:19:30 +01:00
Xavier Delaruelle
2d6dd7c9e6 doc/Makefile: Use $(MAKE) variable for recursive cmds 2018-01-22 20:46:25 +01:00
Xavier Delaruelle
8973b37043 doc: desc. module-virtual command 2018-01-13 16:51:49 +01:00