Before gbasf2 cli or python interface can be used, the user has to source a setup script in the gbasf2 install directory, which sets different environment variables.
In the get_gbasf2_env function, I therefore use the b2luigi setting gbasf2_install_directory, which should be the path to the directory where gbasf2 is installed. The default was ~/gbasf2KEK, which was the install path used in the previous installation instructions. The get_gbasf2_env functions then joins this directory with the sub-path BelleDIRAC/gbasf2/tools/setup to get the full path to the setup file to be sourced.
However, since recently, gbasf2 is available on CVMFS, which is the recommended way to use it. On CVMFS, there are different gbasf2 install directories for different gbasf2 releases, e.g. to use the current release v5r1p3, the user can set in their settings.json the setting:
However, it would be useful to have a default location which always points to the latest release. For that, there is already a symlink on CVMFS. The only "problem" is that it points to a subdirectory of what gbasf2 assumes to be the gbasf2_install_directory:
However, I am not sure how stable that symlink is, hopefully it is stable.
Since we don't need any other files from the gbasf2 install directory except the location of the setup script, in retrospect I think it was a mistake to make the setting point to the install directory, it would be better to have it point to the setup script. Otherwise, the function get_gbasf2_env might break if the location of the setup script within the install directory changes in the future. But now it's late. Maybe I could add a gbasf2_setup_path setting and add a DeprecationWarning when the install directory setting is used. Not sure about that though.
Before gbasf2 cli or python interface can be used, the user has to source a
setup
script in the gbasf2 install directory, which sets different environment variables.In the
get_gbasf2_env
function, I therefore use the b2luigi settinggbasf2_install_directory
, which should be the path to the directory where gbasf2 is installed. The default was~/gbasf2KEK
, which was the install path used in the previous installation instructions. Theget_gbasf2_env
functions then joins this directory with the sub-pathBelleDIRAC/gbasf2/tools/setup
to get the full path to thesetup
file to be sourced.However, since recently, gbasf2 is available on CVMFS, which is the recommended way to use it. On CVMFS, there are different gbasf2 install directories for different gbasf2 releases, e.g. to use the current release
v5r1p3
, the user can set in theirsettings.json
the setting:However, it would be useful to have a default location which always points to the latest release. For that, there is already a symlink on CVMFS. The only "problem" is that it points to a subdirectory of what gbasf2 assumes to be the
gbasf2_install_directory
:I am considering setting the default
gbasf2_install_directory
to the real parent of that, i.e. toHowever, I am not sure how stable that symlink is, hopefully it is stable.
Since we don't need any other files from the gbasf2 install directory except the location of the setup script, in retrospect I think it was a mistake to make the setting point to the install directory, it would be better to have it point to the setup script. Otherwise, the function
get_gbasf2_env
might break if the location of thesetup
script within the install directory changes in the future. But now it's late. Maybe I could add agbasf2_setup_path
setting and add aDeprecationWarning
when the install directory setting is used. Not sure about that though.