File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ Modules 5.3.1 (not yet released)
2929 available in several modulepaths. (fix issue #497)
3030* Do not match module commands with :mfcmd: `--not-req<module> ` option set on
3131 ``require `` or ``incompat `` extra specifier queries. (fix issue #498)
32+ * When one variant is specified multiple times on search context
33+ (:subcmd: `avail `, :subcmd: `paths ` or :subcmd: `whatis ` sub-commands),
34+ available modules returned are those providing all variant values set. (fix
35+ issue #499)
3236
3337.. _Hunspell : https://hunspell.github.io/
3438
Original file line number Diff line number Diff line change @@ -900,6 +900,8 @@ The following module sub-commands appeared on Modules 5.
900900
901901 * variant specified in search query is taken into account to return available
902902 modules matching the variant specification.
903+ * when one variant is specified multiple times in search query, returned
904+ modules are those providing all the specified variant values.
903905 * Search query with just a variant set (no module name and version) is
904906 accepted.
905907 * :ref: `Extra specifier ` is accepted in search query to query content of
Original file line number Diff line number Diff line change @@ -338,12 +338,19 @@ module* context:
338338* multiple variants mentioned act as an *AND * operation
339339
340340 * ``module avail mod/1.0 foo=val1 bar=val2 ``
341- * means *foo * equals *val1 * and *bar * equals *val2 *
341+ * means module defines *foo * variant with *val1 * as an available value and
342+ *bar * variant with *val2 * as an available value
342343
343- * same variant mentioned multiple times: only the last mention is retained
344+ * same variant mentioned multiple times: all mentions retained and act as an
345+ *AND * operation
344346
345347 * ``module avail mod/1.0 foo=val1 foo=val2 ``
346- * means *foo * equals *val2 *
348+ * means module defines *foo * variant with *val1 * and *val2 * as available
349+ values
350+
351+ Behavior for a single variant specified multiple times is adapted on *return
352+ all matching modules * context to be the same as a single extra specifier set
353+ multiple times.
347354
348355In extra match search query, extra specifiers are expressed with *name:value *
349356syntax. Using *: * as separator helps to distinguish from variant
Original file line number Diff line number Diff line change @@ -2776,6 +2776,13 @@ evaluation. Variants defined in modulefile are collected during this
27762776evaluation then compared to the variants specified in search query. If there
27772777is a match, module is included in search results otherwise it is withdrawn.
27782778
2779+ When searching for available modules, if one variant is specified multiple
2780+ times, matching modules are those providing all specified variant values. For
2781+ instance ``bar=value1 bar=value2 `` will return modules defining a ``bar ``
2782+ variant with ``value1 `` and ``value2 `` as available values. On a module
2783+ selection context, only the last specified value is retained. Which means on
2784+ previous example that ``bar `` variant is set to ``value2 ``.
2785+
27792786Module variants are reported along the module they are associated to on
27802787:subcmd: `list ` sub-command results. They are also reported on :subcmd: `avail `
27812788sub-command if specified in search query or added to the element to report in
You can’t perform that action at this time.
0 commit comments