diff options
author | Kai Germaschewski <kai.germaschewski@gmail.com> | 2020-03-18 19:41:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-18 16:41:18 -0700 |
commit | 3df712a385ebca05e37dafb7d49ee0f435b5f516 (patch) | |
tree | ae5e4dc815448b021e5b3e4dd7afc6d284bd068d /lib | |
parent | 1bcc80ec5d579c733b527bcbca5cad95fa0a3986 (diff) | |
download | spack-3df712a385ebca05e37dafb7d49ee0f435b5f516.tar.gz spack-3df712a385ebca05e37dafb7d49ee0f435b5f516.tar.bz2 spack-3df712a385ebca05e37dafb7d49ee0f435b5f516.tar.xz spack-3df712a385ebca05e37dafb7d49ee0f435b5f516.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/database.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 5b4d36717c..4b889da425 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -311,7 +311,7 @@ class Database(object): 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 |