z10_spack_environment.sh: don't set DETECTOR*#228
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the container’s Spack environment initialization to avoid exporting incorrect detector variables when multiple detectors are installed, deferring detector selection to z21_epic_main.sh.
Changes:
- Removes
export DETECTOR*lines from/etc/profile.d/z10_spack_environment.shafter generating it fromspack env activate. - Adds inline documentation explaining why detector selection is handled elsewhere in the container.
|
@wdconinc What do you think about this? I wouldn't want to ship 26.04.0 with 25.12.0 geometry being loaded by default silently. |
These changes look fine (if hacky) to me. I don't have a better approach (one way would be to have a single most recent epic end up in the default view, but I don't know how we make sure that's the latest one either). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
While testing the eic/containers#228 I discovered that the thisepic.sh does not work in container initialization due to it being a bash script. This converts it to a POSIX shell script. setup.sh logic is moved to a separate file, and it now reports that it's really an error. --------- Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
As discussed in eic/eic-spack#856, the
/etc/profile.d/z10_spack_environment.shsetsDETECTOR_PATHandDETECTOR_CONFIGto a wrong value when multiple detectors are present. In container, this is better handled by the/etc/profile.d/z21_epic_main.sh.