AAROC / CODE-RADE

Website, documentation and such for the CODE-RADE project
http://www.africa-grid.org/CODE-RADE
Apache License 2.0
5 stars 5 forks source link

Unable to load modules in coderade #222

Closed glarocca closed 6 years ago

glarocca commented 6 years ago

Hi,

When sourcing the /cvmfs/code-rade.africa-grid.org/use.sh file I've the following error messages:

ModuleCmd_Use.c(231):ERROR:64: Directory '/cvmfs/code-rade.africa-grid.org/modules//cvmfs/code-rade.africa-grid.org/modules/astronomy' not found
ModuleCmd_Use.c(231):ERROR:64: Directory '/cvmfs/code-rade.africa-grid.org/modules//cvmfs/code-rade.africa-grid.org/modules/bioinformatics' not found
[..]

The correct use.sh script should be:

#!/bin/bash
# Enable special handling to prevent expansion to a
# literal '/tmp/backup/*' when no matches are found. 
# HT https://stackoverflow.com/questions/11584029/how-can-i-store-a-list-of-directories-in-an-array
shopt -s nullglob
. /etc/profile.d/modules.sh
CVMFS_DIR=/cvmfs/code-rade.africa-grid.org
MODULES_DIRS=($CVMFS_DIR/modules/*)
for domain in "${MODULES_DIRS[@]}" ; do
  module use /cvmfs/code-rade.africa-grid.org/modules/`basename ${domain}`
done

module  list
brucellino commented 6 years ago

hi @glarocca thanks very much for reporting the issue. I'll add some tests to the deployment pipeline to make sure this kind of thing is caught upstream.

brucellino commented 6 years ago

This has been resolved in revision 163 of the CODE-RADE CVMFS repo.