fix: select correct variant if 'first_match' set

This commit is contained in:
2026-03-27 12:09:02 +01:00
parent ba55ca9908
commit b345a7ca40
2 changed files with 16 additions and 7 deletions
+11 -5
View File
@@ -2,17 +2,20 @@
## Version 2.1.0
### modulecmd
* Stub functions `module-hide` and `module-tag` added. The main purpose is
to make migration to the Tcl Env. Modules easier.
(#1395g)
* Enhancemnet: Stub functions `module-hide` and `module-tag` added. The main
purpose is to make migration to the Tcl Env. Modules easier.
(#1395)
* Bugfix: un-using an overlay didn't remove the directories of the overlay
in all cases.
(#1387)
* Bugfix: Under some conditions it could happen, that the variable
GroupDepths($group) was undefined in the function get\_load\_hints().
(#1368)
(#1368, #1384)
### Build system
* Bugfix: Issue selecting the correct variant fixed if 'first_match' was set
as variant.
(#1401)
* Use patchelf 0.14.5 and Lmod 9.1.1
(#1391, #1393)
* Bugfix: Selecting the variant to build on the cmd-line did not work.
@@ -24,11 +27,14 @@
in all cases.
(#1387)
* Bugfix: Under some conditions it could happen, that the variable
GroupDepths($group) was undefined in the function get\_load\_hints().
GroupDepths($group) was undefined in the function get_load_hints().
The PR for issue #1368 didn't fix the bug.
(#1368, #1384)
### build-system
* Bugfix: Issue selecting the correct variant fixed if 'first_match' was set
as variant.
(#1401)
* Enhancemnet: It is now possible to specify a sub-directory relative to
$SRC_DIR used by cmake/autotools in the YAML config file.
(#1382)
+5 -2
View File
@@ -1060,6 +1060,7 @@ build_modules_yaml_v1(){
local -- compiler
local -- mpi
local -i n=0
for compiler in "${with_compiler[@]}"; do
for mpi in "${with_mpi[@]}"; do
# build if opt_with_modules is empty or compiler is in this array
@@ -1075,9 +1076,11 @@ build_modules_yaml_v1(){
"$3" \
"${compiler}" \
"${mpi}" \
"${@:4}"
"${@:4}" || std::die 42 "Fatal error building the module!"
(( n++ ))
done
done
(( n > 0 ))
}
build_modules_hdf5(){
@@ -1504,7 +1507,7 @@ build_modules_yaml_v1(){
variant_config || continue
build_modules_variant \
"${name}" "${version}" \
variant_config
variant_config || continue
if [[ "${mod_config['build_variants']}" == 'first_match' ]]; then
break
fi