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.
This commit is contained in:
parent
c803f7ae98
commit
716f12dd58
1 changed files with 5 additions and 1 deletions
|
@ -309,7 +309,11 @@ def reindex(self, directory_layout):
|
||||||
for spec in directory_layout.all_specs():
|
for spec in directory_layout.all_specs():
|
||||||
# Create a spec for each known package and add it.
|
# Create a spec for each known package and add it.
|
||||||
path = directory_layout.path_for_spec(spec)
|
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()
|
self._check_ref_counts()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue