Commit Graph

158 Commits

Author SHA1 Message Date
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
8fd5d94fb7 doc: update unload-firstly-loaded recipe with unload_match_order cfg 2019-05-26 07:33:07 +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
1cadbab8bd doc: desc config sub-cmd in diff_v3_v4 2019-05-19 10:46:35 +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
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
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
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