Merge branch '432-build-system-don-t-remove-modulefiles-in-other-overlays-by-default' into 'master'

Resolve "build-system: don't remove modulefiles in other overlays by default"

Closes #432

See merge request Pmodules/src!464
This commit is contained in:
2025-07-17 13:54:53 +02:00
2 changed files with 13 additions and 2 deletions
+6 -2
View File
@@ -1290,7 +1290,9 @@ _build_module() {
#
# FIXME: Can it happen, that we remove module-/config-files which
# we shouldn't remove?
# For now we exclude removing from the overlay 'base' only.
# For now we exclude removing from the overlay 'base' only
# This function is only called if the option '--cleanup-modulefiles'
# was specified.
#
[[ "${is_subpkg}" == 'yes' ]] && return 0
local ol=''
@@ -1612,7 +1614,9 @@ _build_module() {
bm::build_sub_packages "${ModuleConfig['sub_packages']}"
fi
bm::cleanup_modulefiles
if [[ "${opt_cleanup_modulefiles}" == 'yes' ]]; then
bm::cleanup_modulefiles
fi
std::info \
"\n%s\n%s" \
"${module_name}/${module_version}: done" \
+7
View File
@@ -80,6 +80,9 @@ BUILD-STEPS OPTIONS:
--update-modulefiles
Only install the modulefile and set the release.
--cleanup-modulefiles
Remove modulefiles in other overlays.
MISCELLANEOUS OPTIONS:
-? | -h | --help
@@ -144,6 +147,7 @@ declare opt_enable_cleanup_src='yes'
declare opt_force_rebuild='no'
declare -i opt_jobs=0
declare opt_update_modulefiles='no'
declare opt_cleanup_modulefiles='no'
declare opt_system=''
declare opt_verbose='no'
# array collecting all modules specified on the command line via '--with=module'
@@ -266,6 +270,9 @@ parse_args() {
--update-modulefiles )
opt_update_modulefiles='yes'
;;
--cleanup-modulefiles )
opt_cleanup_modulefiles='yes'
;;
--config-file | --config-file=* )
if [[ $1 == *=* ]]; then
opt_config_file=( "${1#--*=}" )