diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2022-06-29 15:14:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 14:14:21 -0600 |
commit | b200c577392911436656799f1c9b0a5c9241ecaa (patch) | |
tree | 5c604d5fe5ba708e48f36a07c6415ad71668cf86 | |
parent | 814418db355a8e06610a060005ebb0aa721b7bae (diff) | |
download | spack-b200c577392911436656799f1c9b0a5c9241ecaa.tar.gz spack-b200c577392911436656799f1c9b0a5c9241ecaa.tar.bz2 spack-b200c577392911436656799f1c9b0a5c9241ecaa.tar.xz spack-b200c577392911436656799f1c9b0a5c9241ecaa.zip |
Set R_LIBS_USER='' in dependent build environment (#31287)
* Set R_LIBS_USER='' in dependent build environment
Despite R packages being installed with the --vanilla flag, which
ignores Rprofile and Renviron files, R will still set R_LIBS_USER if the
default directory exists. This could lead to pulling in packages from
that directory during the build which could cause the build to fail. To
avoid that, explicitly set R_LIB_USER='' to ensure that packages from
the HOME/R directory are not in the library path.
* Update var/spack/repos/builtin/packages/r/package.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/r/package.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 837b140bbc..6418d11ebf 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -210,6 +210,11 @@ class R(AutotoolsPackage): r_libs_path = ':'.join(r_libs_path) env.set('R_LIBS', r_libs_path) + # R_LIBS_USER gets set to a directory in HOME/R if it is not set, such as + # during package installation with the --vanilla flag. Set it to null + # to ensure that it does not point to a directory that may contain R + # packages. + env.set('R_LIBS_USER', '') env.set('R_MAKEVARS_SITE', join_path(self.etcdir, 'Makeconf.spack')) |