diff options
author | Kai Germaschewski <kai.germaschewski@gmail.com> | 2020-03-18 19:41:18 -0400 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-03-20 11:46:23 -0700 |
commit | 09e13cf7cf0327bb35a9b3d4e7c7ad64ea4a3076 (patch) | |
tree | 3468468411d624b3845d0c316977439d7f834bc0 | |
parent | 296d58ef6bf07fa1440c988d6b2e1268d83e671f (diff) | |
download | spack-09e13cf7cf0327bb35a9b3d4e7c7ad64ea4a3076.tar.gz spack-09e13cf7cf0327bb35a9b3d4e7c7ad64ea4a3076.tar.bz2 spack-09e13cf7cf0327bb35a9b3d4e7c7ad64ea4a3076.tar.xz spack-09e13cf7cf0327bb35a9b3d4e7c7ad64ea4a3076.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
-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 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 |