-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #270 spack disable local config #272
Conversation
I was expecting to see |
SPACK_USER_CACHE_PATH will default to /tmp/$USER/spack (will be created if it doesn't exist). Once the working area env.sh is sourced, it will be set to $DBT_AREA_ROOT
…into amogan/issue270_spack_disable_local
The reason I didn't initially Here's a test that helps illustrate what I mean. I ran this on
|
I'm confused by: source daq-buildtools/env.sh
…--Ron
On Fri, 2024-04-12 at 11:20 -0700, Andrew Mogan wrote:
[EXTERNAL] – This message is from an external sender
The reason I didn't initially export SPACK_USER_CACHE_PATH=${DBT_AREA_ROOT} inenv.sh is because ${DBT_AREA_ROOT} isn't defined until you sourcemy/daq/area/env.sh, which exports DBT_AREA_ROOT=/my/daq/area. So the new solution is to initially default SPACK_USER_CACHE_PATH to /tmp/$USER/spack (which does createcache under the spack directory, as per your question), and then exportSPACK_USER_CACHE_DIR=${DBT_AREA_ROOT} when you runmy/daq/area/env.sh. This means that $HOME/.spack is never created by dbt-create -s, but it will still print a warning if that directory exists.
Here's a test that helps illustrate what I mean. I ran this on daq.fnal.gov as myself. After cloning daq-buildtools and checking out this branch,
$ pwd # /nfs/home/amogan
$ env | grep SPACK # Initially empty
$ ls $HOME/.spack # If exists, (re)move it
$ source daq-buildtools/env.sh
$ env | grep SPACK
SPACK_DISABLE_LOCAL_CONFIG=true
SPACK_USER_CACHE_PATH=/tmp/amogan/spack
$ ls /tmp/$USER/spack # Should be empty or nonexistent
$ dbt-create -s -n NFD_DEV_240411_A9 test_spack_disable_local
$ ls /tmp/$USER/spack # Now has cache subdir
$ ls $HOME/.spack # Should still not exist
$ cd test_spack_disable_local
$ source env.sh
$ env | grep SPACK
SPACK_DISABLE_LOCAL_CONFIG=true
SPACK_USER_CACHE_PATH=/home/nfs/amogan/test_spack_disable_local
$ ls $HOME/.spack # Still nonexistent
—
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DUNE-2DDAQ_daq-2Dbuildtools_pull_272-23issuecomment-2D2052250322&d=DwMFaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=7KXkqf0bzyUQv15jBKEcHw&m=olHZxZo7TAFT78vQHcjNcfsp7sm4fR_crMpuZw_jq1vFn0Qijjib-wb91VeXEBYQ&s=EGvD5sbfpIov49RhPIfPy853fGwIye-XZHX-tNxFxh4&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AGH7VZW7J7WJCCDBZCXLGTDY5AQXRAVCNFSM6AAAAABGC2ZRHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJSGI2TAMZSGI&d=DwMFaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=7KXkqf0bzyUQv15jBKEcHw&m=olHZxZo7TAFT78vQHcjNcfsp7sm4fR_crMpuZw_jq1vFn0Qijjib-wb91VeXEBYQ&s=BzRLDDbXBpwQhL34eMgPqYv39RUH5Cn5rftE01h1HDs&e=>.
You are receiving this because your review was requested.Message ID: ***@***.***>
--
Ron Rechenmacher
Engineer, Tools and Advanced Computing
Fermi National Accelerator Laboratory
Batavia, IL 60510
|
Moved from ${DBT_ROOT}/env.sh to ${DBT_ROOT}/scripts/dbt-install-spack.sh. This prevents unncessary environment variable exports in the case where dbt-create is called without -s
This PR seeks to address Issue #270 by
SPACK_DISABLE_LOCAL_CONFIG=true
whenenv.sh
is sourced,dbt_create.py
when-s
is given as an argument,SPACK_USER_CACHE_PATH
to the dev environment so that$HOME/.spack/cache
isn't created, and$HOME/.spack
already exists