diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-09-14 20:03:28 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-09-14 21:07:46 +0900 |
commit | 160bb0c6962efba83918a053ee0a78d4eac349e6 (patch) | |
tree | f4267578a3f7437a3f2dfb7e78c512834ca0b9a6 /buildstream/_stream.py | |
parent | d7152ef47c73c8f56812d132d317f14a6665523a (diff) | |
download | buildstream-160bb0c6962efba83918a053ee0a78d4eac349e6.tar.gz |
_artifactcache/artifactcache.py: Changes to mark_required_elements()
This was previously append_required_artifacts(), which presumed that
we knew at startup time what the cache keys of all elements in the
loaded pipeline would be.
This fixes unexpected deletions of required artifacts when
dynamic tracking is enabled with `bst build --track-all target.bst`
Diffstat (limited to 'buildstream/_stream.py')
-rw-r--r-- | buildstream/_stream.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/buildstream/_stream.py b/buildstream/_stream.py index cceb3d3a5..2e78a1c45 100644 --- a/buildstream/_stream.py +++ b/buildstream/_stream.py @@ -938,13 +938,10 @@ class Stream(): # Set the "required" artifacts that should not be removed # while this pipeline is active # - # FIXME: The set of required artifacts is only really needed - # for build and pull tasks. + # It must include all the artifacts which are required by the + # final product. Note that this is a superset of the build plan. # - # It must include all the artifacts which are required by the - # final product. Note that this is a superset of the build plan. - # - self._artifacts.append_required_artifacts((e for e in self._pipeline.dependencies(elements, Scope.ALL))) + self._artifacts.mark_required_elements(self._pipeline.dependencies(elements, Scope.ALL)) if selection == PipelineSelection.PLAN and dynamic_plan: # We use a dynamic build plan, only request artifacts of top-level targets, |