gaudirun.py unconditionally expands env variables in options
gaudirun.py
always (except for Athena?) expands environment variables in the configuration before passing it to Gaudi::Application
, as can be seen here:
conf_dict = expandvars(getAllOpts())
This is a problem for LHCb when building the so called "functor cache", where cpp sources are created by running a Gaudi job. In particular, expanding variable pointing to data package locations means that the generated sources will be tied to particular versions of data packages on cvmfs, or worse, to the absolute path where the build is done (if data packages are part of the build). It is a problem also when running using a functor cache, as if the env vars are expanded and they were not when making the cache, we get a miss.
Another related problem is that the dumping of options with -o
is done before the expansion, which made spotting this issue quite hard.
There should be a way to conditionally disable the expansion of variables or remove it altogether and let the cpp do it. I am not even sure the current behaviour existed not so long ago.
(this is the underlying issue for lhcb/Moore#137 (closed))