Skip to content

Commit

Permalink
Merge pull request #58 from trz42/pull_in_fixes_PR238_PR239
Browse files Browse the repository at this point in the history
pull in fixes from EESSI/software-layer PR238 and PR239
  • Loading branch information
poksumdo authored Mar 18, 2023
2 parents 280e2a0 + cce81b5 commit 166551b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
8 changes: 4 additions & 4 deletions EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ else
eb --install-latest-eb-release &> ${eb_install_out}
check_exit_code $? "${ok_msg}" "${fail_msg}"

# restore origin $PATH and $PYTHONPATH values
export PATH=${ORIG_PATH}
export PYTHONPATH=${ORIG_PYTHONPATH}

eb --search EasyBuild-${REQ_EB_VERSION}.eb | grep EasyBuild-${REQ_EB_VERSION}.eb > /dev/null
if [[ $? -eq 0 ]]; then
ok_msg="EasyBuild v${REQ_EB_VERSION} installed, alright!"
Expand All @@ -189,6 +185,10 @@ else
check_exit_code $? "${ok_msg}" "${fail_msg}"
fi

# restore origin $PATH and $PYTHONPATH values
export PATH=${ORIG_PATH}
export PYTHONPATH=${ORIG_PYTHONPATH}

module avail easybuild/${REQ_EB_VERSION} &> ${ml_av_easybuild_out}
if [[ $? -eq 0 ]]; then
echo_green ">> EasyBuild module installed!"
Expand Down
21 changes: 18 additions & 3 deletions create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cd ${overlay_upper_dir}/versions/
echo ">> Collecting list of files/directories to include in tarball via ${PWD}..."

files_list=${tmpdir}/files.list.txt
module_files_list=${tmpdir}/module_files.list.txt

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

# add a bit debug output
echo "wrote file list to ${files_list}"
[ -r ${files_list} ] && cat ${files_list}
echo "wrote module file list to ${module_files_list}"
[ -r ${module_files_list} ] && cat ${module_files_list}

topdir=${cvmfs_repo}/versions/

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

0 comments on commit 166551b

Please sign in to comment.