diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2016-06-15 12:48:40 -0400 |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2016-06-15 12:48:40 -0400 |
commit | 716f12dd580cb6f78f085d94e5a45679ba6c8041 (patch) | |
tree | d858aa1cfbb2036656f69c8e7c231a9989379ede /lib | |
parent | c803f7ae98dd7a1762e4eda89145e6ca50091136 (diff) | |
download | spack-716f12dd580cb6f78f085d94e5a45679ba6c8041.tar.gz spack-716f12dd580cb6f78f085d94e5a45679ba6c8041.tar.bz2 spack-716f12dd580cb6f78f085d94e5a45679ba6c8041.tar.xz spack-716f12dd580cb6f78f085d94e5a45679ba6c8041.zip |
reindex: preserve 'explicit' flags
Look up in the old database whether the spec was explicit or not and
preserve it into the new database.
Fixes #1050.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/database.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index e768ddf5fe..59d577f0c7 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -309,7 +309,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() |