Skip to content

Commit 166551b

Browse files
authored
Merge pull request #58 from trz42/pull_in_fixes_PR238_PR239
pull in fixes from EESSI/software-layer PR238 and PR239
2 parents 280e2a0 + cce81b5 commit 166551b

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

EESSI-pilot-install-software.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ else
177177
eb --install-latest-eb-release &> ${eb_install_out}
178178
check_exit_code $? "${ok_msg}" "${fail_msg}"
179179

180-
# restore origin $PATH and $PYTHONPATH values
181-
export PATH=${ORIG_PATH}
182-
export PYTHONPATH=${ORIG_PYTHONPATH}
183-
184180
eb --search EasyBuild-${REQ_EB_VERSION}.eb | grep EasyBuild-${REQ_EB_VERSION}.eb > /dev/null
185181
if [[ $? -eq 0 ]]; then
186182
ok_msg="EasyBuild v${REQ_EB_VERSION} installed, alright!"
@@ -189,6 +185,10 @@ else
189185
check_exit_code $? "${ok_msg}" "${fail_msg}"
190186
fi
191187

188+
# restore origin $PATH and $PYTHONPATH values
189+
export PATH=${ORIG_PATH}
190+
export PYTHONPATH=${ORIG_PYTHONPATH}
191+
192192
module avail easybuild/${REQ_EB_VERSION} &> ${ml_av_easybuild_out}
193193
if [[ $? -eq 0 ]]; then
194194
echo_green ">> EasyBuild module installed!"

create_tarball.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ cd ${overlay_upper_dir}/versions/
3838
echo ">> Collecting list of files/directories to include in tarball via ${PWD}..."
3939

4040
files_list=${tmpdir}/files.list.txt
41+
module_files_list=${tmpdir}/module_files.list.txt
4142

4243
if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/.lmod ]; then
4344
# include Lmod cache and configuration file (lmodrc.lua),
@@ -49,12 +50,26 @@ if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules ]; then
4950
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type f | grep -v '/\.wh\.' >> ${files_list}
5051
# module symlinks
5152
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type l | grep -v '/\.wh\.' >> ${files_list}
53+
# module files and symlinks
54+
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules/all -type f -o -type l \
55+
| grep -v '/\.wh\.' | sed -e 's/.lua$//' | awk -F'/' '{printf "%s/%s\n", $(NF-1), $NF}' | sort | uniq \
56+
>> ${module_files_list}
5257
fi
53-
if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software ]; then
54-
# installation directories
55-
ls -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software/*/* | grep -v '/\.wh\.' >> ${files_list}
58+
if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software -a -r ${module_files_list} ]; then
59+
# installation directories but only those for which module files were created
60+
for package_version in $(cat ${module_files_list}); do
61+
echo "handling ${package_version}"
62+
ls -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software/${package_version} \
63+
| grep -v '/\.wh\.' >> ${files_list}
64+
done
5665
fi
5766

67+
# add a bit debug output
68+
echo "wrote file list to ${files_list}"
69+
[ -r ${files_list} ] && cat ${files_list}
70+
echo "wrote module file list to ${module_files_list}"
71+
[ -r ${module_files_list} ] && cat ${module_files_list}
72+
5873
topdir=${cvmfs_repo}/versions/
5974

6075
echo ">> Creating tarball ${target_tgz} from ${topdir}..."

0 commit comments

Comments
 (0)