Skip to content

Commit

Permalink
Merge pull request #460 from trz42/use_existing_software_subdir
Browse files Browse the repository at this point in the history
only pick a software subdir that is present in the CVMFS repository
  • Loading branch information
boegel authored Jan 24, 2024
2 parents 10ba690 + 699052b commit 9fe2d6c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions init/eessi_environment_variables
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ if [ -d $EESSI_PREFIX ]; then
# determine subdirectory in software layer
if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then
# if archdetect is enabled, use internal code
export EESSI_SOFTWARE_SUBDIR=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh cpupath)
show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}"
all_cpupaths=$(${EESSI_INIT_DIR_PATH}/eessi_archdetect.sh -a cpupath)
# iterate over colon-separated list verifying if the architecture is present
# under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match
IFS=: read -r -a archs <<< "${all_cpupaths}"
for arch in "${archs[@]}"; do
if [ -d ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${arch} ]; then
export EESSI_SOFTWARE_SUBDIR=${arch}
show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}"
break
fi
done
elif [ "$EESSI_USE_ARCHSPEC" == "1" ]; then
# note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined!
export EESSI_EPREFIX_PYTHON=$EESSI_EPREFIX/usr/bin/python3
Expand Down

0 comments on commit 9fe2d6c

Please sign in to comment.