From 731514599738160303d548053929f80ee33ab490 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 14 Nov 2024 14:33:03 +0100 Subject: [PATCH] disable hook, use recursive rm and do ls on specific directory --- EESSI-remove-software.sh | 34 +++++++++++++++++++--------------- eb_hooks.py | 2 +- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/EESSI-remove-software.sh b/EESSI-remove-software.sh index 10f57fe678..29a47c0686 100755 --- a/EESSI-remove-software.sh +++ b/EESSI-remove-software.sh @@ -132,21 +132,25 @@ if [ $EUID -ne 0 ]; then # app_dir=${EASYBUILD_INSTALLPATH}/software/${app} # app_module=${EASYBUILD_INSTALLPATH}/modules/all/${app}.lua echo_yellow "Removing ${app_dir} and ${app_module}..." - # rm -rdfv ${app_dir} - # rm -rdfv ${app_module} - # 1st remove files in depth-first order - for filepath in $(find ${app_dir} -depth -type f); do - echo " removing file ${filepath}" - rm -fv ${filepath} - done - # 2nd remove directories in depth-first order - for dirpath in $(find ${app_dir} -depth -type d); do - echo " removing directory ${dirpath}" - rmdir -v ${dirpath} - done - # 3rd remove module file - echo " removing module file ${app_module}" - rm -fv ${app_module} + # suggestion: use the recursive rm's and ls a specific + # directory only (${app_dir}/easybuild) + rm -rdfv ${app_dir} + rm -rdfv ${app_module} + ls ${app_dir}/easybuild || true + + ## 1st remove files in depth-first order + #for filepath in $(find ${app_dir} -depth -type f); do + # echo " removing file ${filepath}" + # rm -fv ${filepath} + #done + ## 2nd remove directories in depth-first order + #for dirpath in $(find ${app_dir} -depth -type d); do + # echo " removing directory ${dirpath}" + # rmdir -v ${dirpath} + #done + ## 3rd remove module file + #echo " removing module file ${app_module}" + #rm -fv ${app_module} done else fatal_error "Easystack file ${easystack_file} not found!" diff --git a/eb_hooks.py b/eb_hooks.py index 5877d7c3b8..fd88d8399a 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1049,5 +1049,5 @@ def pre_package_eessi_extend(self, *args, **kwargs): } PRE_PACKAGE_HOOKS = { - 'EESSI-extend': pre_package_eessi_extend, + # 'EESSI-extend': pre_package_eessi_extend, }