summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-17 14:29:47 -0700
committerGitHub <noreply@github.com>2016-06-17 14:29:47 -0700
commitd7f48e1ff0161f0c67fb7a3398d395f6cb63ec6c (patch)
tree138b60348cd74a1cdef2f0d6ae60557fcbb3772f /lib
parent0bbbfc2ef7f91494e057a525718c466c74dca830 (diff)
parent716f12dd580cb6f78f085d94e5a45679ba6c8041 (diff)
downloadspack-d7f48e1ff0161f0c67fb7a3398d395f6cb63ec6c.tar.gz
spack-d7f48e1ff0161f0c67fb7a3398d395f6cb63ec6c.tar.bz2
spack-d7f48e1ff0161f0c67fb7a3398d395f6cb63ec6c.tar.xz
spack-d7f48e1ff0161f0c67fb7a3398d395f6cb63ec6c.zip
Merge pull request #1061 from mathstuf/reindex-preserve-explicit
reindex: preserve 'explicit' flags
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/database.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index 38bb7541e0..f941346bb1 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -311,7 +311,11 @@ class Database(object):
for spec in directory_layout.all_specs():
# Create a spec for each known package and add it.
path = directory_layout.path_for_spec(spec)
- self._add(spec, path, directory_layout)
+ old_info = old_data.get(spec.dag_hash())
+ explicit = False
+ if old_info is not None:
+ explicit = old_info.explicit
+ self._add(spec, path, directory_layout, explicit=explicit)
self._check_ref_counts()