Skip to content

geant4-data: symlink only specific data dirs - #47367

Merged
drbenmorgan merged 1 commit into
spack:developfrom
stephenswat:geant4-data/symlinks
Nov 4, 2024
Merged

geant4-data: symlink only specific data dirs#47367
drbenmorgan merged 1 commit into
spack:developfrom
stephenswat:geant4-data/symlinks

Conversation

@stephenswat

Copy link
Copy Markdown
Contributor

Currently, the geant4-data spec creates symlink to all of its dependencies, and it does so by globbing their share/ directories. This works very well for the way Spack installs these, but it doesn't work for anybody wanting to use e.g. the Geant4 data on CVMFS. See pull request #47298. This commit changes the way the geant4-data spec works. It no longer blindly globs directories and makes symlinks, but it asks its dependencies specifically for the name of their data directory. This should allow us to use Spack to use the CVMFS installations as externals.

Currently, the `geant4-data` spec creates symlink to all of its
dependencies, and it does so by globbing their `share/` directories.
This works very well for the way Spack installs these, but it doesn't
work for anybody wanting to use e.g. the Geant4 data on CVMFS. See pull
request spack#47298. This commit changes the way the `geant4-data` spec
works. It no longer blindly globs directories and makes symlinks, but it
asks its dependencies specifically for the name of their data directory.
This should allow us to use Spack to use the CVMFS installations as
externals.

@drbenmorgan drbenmorgan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice update @stephenswat! Works nicely locally with a mix of local installs and externals taken from CVMFS.

@drbenmorgan

Copy link
Copy Markdown
Member

@wdconinc, would appreciate a quick review/approval from you in case you spot anything!

@wdconinc wdconinc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I likely won't have time to test this similar to @drbenmorgan with a mixture of external sources. All looks great to me, though!

One (out of scope for this PR) idea would be to reduce the duplication a bit more by having geant4-data define a dataset base class that just defines the install and setup_dependent_run_environment once.

@drbenmorgan
drbenmorgan merged commit 2214fc8 into spack:develop Nov 4, 2024
fryeguy52 pushed a commit to fryeguy52/spack that referenced this pull request Dec 17, 2024
Currently, the `geant4-data` spec creates symlink to all of its
dependencies, and it does so by globbing their `share/` directories.
This works very well for the way Spack installs these, but it doesn't
work for anybody wanting to use e.g. the Geant4 data on CVMFS. See pull
request spack#47298. This commit changes the way the `geant4-data` spec
works. It no longer blindly globs directories and makes symlinks, but it
asks its dependencies specifically for the name of their data directory.
This should allow us to use Spack to use the CVMFS installations as
externals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants