From 504d2b7ad89dafec10f0560aece56b58d5fe64a5 Mon Sep 17 00:00:00 2001 From: gsell Date: Fri, 23 Aug 2024 13:35:42 +0200 Subject: [PATCH] Merge branch '336-build-system-don-t-cleanup-modulefiles-in-the-base-overlay' into 'master' Resolve "build-system: don't cleanup modulefiles in the base overlay" Closes #336 See merge request Pmodules/src!315 (cherry picked from commit 48d5ded1f6182e559681e8d5fa299b984d68d96a) 9b720ba9 build-system: don't cleanup modulefiles in base overlay Co-authored-by: gsell --- Pmodules/libpbuild.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index c94684f..3052cf3 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -1399,10 +1399,16 @@ _build_module() { } cleanup_modulefiles(){ + # + # 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. + # [[ "${is_subpkg}" == 'yes' ]] && return 0 local ol='' for ol in "${Overlays[@]}"; do [[ "${ol}" == "${ol_name}" ]] && continue + [[ "${ol}" == 'base' ]] && continue local modulefiles_root="${OverlayInfo[${ol}:modulefiles_root]}" local dir="${modulefile_dir/${ol_modulefiles_root}/${modulefiles_root}}" local fname="${dir}/${module_version}"