diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d190a0..836bf1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,11 @@ ### modulecmd ### build-system -* fix in parsing arguments (issue #238) -* group dependencies specified with the option '--with' were ignored +* BUGFIX: parsing arguments fixed (issue #238) +* BUGFIX: group dependencies specified with the option '--with' were ignored (issue #236) +* BUGFIX: writing list of 'systems' to module configuration file fixed + (issue #235) ### Toolchain * update to Tcl 8.6.14 (issue #239) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 8ce8433..b345f58 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -893,14 +893,13 @@ pbuild.build_module_legacy(){ readonly -f pbuild.build_module_legacy declare -n Config -declare -- Systems +declare -a Systems pbuild.build_module_yaml(){ local -- module_name="$1" local -- module_version="$2" Config=$3 local -- module_relstage="${Config['relstage']}" - local -- tmp="${Config['systems']//::/, }" - Systems="${tmp:1:-1}" + Systems=( ${Config['systems']} ) shift 3 _build_module "${module_name}" "${module_version}" "${module_relstage}" "$@" } @@ -1528,7 +1527,13 @@ _build_module() { fi if [[ "${status_yaml_config_file}" != 'unchanged' ]]; then echo "relstage: ${module_release}" > "${yaml_config_file}" - echo "Systems: [${Systems}]" >> "${yaml_config_file}" + if (( ${#Systems[@]} > 0 )); then + echo -n "systems: [${Systems[0]}" >> "${yaml_config_file}" + for system in "${Systems[@]:1}"; do + echo -n ", ${system}" >> "${yaml_config_file}" + done + echo "]" >> "${yaml_config_file}" + fi fi case ${status_yaml_config_file},${status_legay_config_file} in