DUNE-DAQ / daq-buildtools

Make life for developers easier through a collection of CMake functions and scripts
0 stars 1 forks source link

Remove need for `dbt-settings.sh` in a workarea based on Spack #182

Closed jcfreeman2 closed 2 years ago

jcfreeman2 commented 2 years ago

dbt-settings.sh is primarily used to define the UPS products a workarea's repos build against, which of course isn't needed when a Spack-based workarea is used. However, it also defines the DUNE_DAQ_BASE_RELEASE environment variable, which is needed, e.g., in order to for scripts to figure out which Spack repo to set up.

In order to keep the DUNE_DAQ_BASE_RELEASE variable for Spack workareas while eliminating all the UPS info and the need for dbt-settings.sh, the plan is the following: -Make copying dbt-settings.sh into a workarea only occur if --spack isn't passed to dbt-create.py -Whether or not --spack is passed, keep the file dbt-env.sh in the workarea, but no longer have it be a softlink to daq-buildtools' env.sh. Instead: have it contain DUNE_DAQ_BASE_RELEASE , as well as the original daq-buildtools off of which the workarea was created - stored in, say, a DBT_ROOT_ON_CREATION environment variable -If someone sources dbt-env.sh, it'll set the DUNE_DAQ_BASE_RELEASE variable and also source $DBT_ROOT_ON_CREATION/env.sh if DBT_ROOT hasn't already been set -Whenever a script needs to figure out the release a workarea is based on, it can just consult dbt-env.sh's DUNE_DAQ_BASE_RELEASE variable

jcfreeman2 commented 2 years ago

To quote Pengfei: "This has been implemented. dbt now creates a dbt-workarea-constants.sh where the ENVs related to spack are stored."