spack/lib/spack
Todd Gamblin d89ae7bcde
Database: make constructor safe for read-only filesystems (#48454)
`spack find` and other commands that read the DB will fail if the databse is in a
read-only location, because `FailureTracker` and `Database` can try to create their
parent directories when they are constructed, even if the DB root is read-only.

Instead, we should only write to the filesystem when needed.

- [x] don't create parent directories in constructors
- [x] have write operations create parents if needed
- [x] in tests, `chmod` databases to be read-only unless absolutely needed.

---------

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2025-01-14 00:10:51 -08:00
..
docs build(deps): bump pygments from 2.18.0 to 2.19.1 in /lib/spack/docs (#48431) 2025-01-09 11:31:42 +01:00
env Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
external Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
llnl Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
spack Database: make constructor safe for read-only filesystems (#48454) 2025-01-14 00:10:51 -08:00
spack_installable Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00