From 09e13cf7cf0327bb35a9b3d4e7c7ad64ea4a3076 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Wed, 18 Mar 2020 19:41:18 -0400 Subject: 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 --- lib/spack/spack/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index e04a1f292a..f3c88a75c3 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -324,7 +324,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 -- cgit v1.2.3-70-g09d2