Upstreams: don't write metadata directory to upstream DB (#15526)
When trying to use an upstream Spack repository, as of f2aca86
Spack
was attempting to write to the upstream DB based on a new metadata
directory added in that commit. Upstream DBs are read-only, so this
should not occur.
This adds a check to prevent Spack from writing to the upstream DB
This commit is contained in:
parent
296d58ef6b
commit
09e13cf7cf
@ -324,7 +324,7 @@ def __init__(self, root, db_dir=None, upstream_dbs=None,
|
||||
if not os.path.exists(self._db_dir):
|
||||
mkdirp(self._db_dir)
|
||||
|
||||
if not os.path.exists(self._failure_dir):
|
||||
if not os.path.exists(self._failure_dir) and not is_upstream:
|
||||
mkdirp(self._failure_dir)
|
||||
|
||||
self.is_upstream = is_upstream
|
||||
|
Loading…
Reference in New Issue
Block a user