diff options
author | Benjamin Schubert <bschubert15@bloomberg.net> | 2019-11-26 18:40:23 +0000 |
---|---|---|
committer | Benjamin Schubert <contact@benschubert.me> | 2020-01-16 14:36:35 +0000 |
commit | 93ebe4992c32b2588ae213a98c3e05d60c974a00 (patch) | |
tree | 0805dadc7f75ee208c46b08bada7b4ba13752acb /src/buildstream/_pipeline.py | |
parent | c48e89d5da3a7b2b2e72d536aaea9ec182d1e1fd (diff) | |
download | buildstream-93ebe4992c32b2588ae213a98c3e05d60c974a00.tar.gz |
element.py: Remove _get_consistency and introduce explicit methods
This replaces the _get_consistency method by two methods:
`_has_all_sources_resolved` and `_has_all_sources_cached` which allows
a more fine grained control on what information is needed.
Diffstat (limited to 'src/buildstream/_pipeline.py')
-rw-r--r-- | src/buildstream/_pipeline.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildstream/_pipeline.py b/src/buildstream/_pipeline.py index 8d0a3b411..1a98fccf5 100644 --- a/src/buildstream/_pipeline.py +++ b/src/buildstream/_pipeline.py @@ -29,7 +29,7 @@ from pyroaring import BitMap # pylint: disable=no-name-in-module from ._exceptions import PipelineError from ._message import Message, MessageType from ._profile import Topics, PROFILER -from . import Scope, Consistency +from . import Scope from ._project import ProjectRefStorage from .types import _PipelineSelection @@ -340,7 +340,7 @@ class Pipeline: inconsistent_workspaced = [] with self._context.messenger.timed_activity("Checking sources"): for element in elements: - if element._get_consistency() == Consistency.INCONSISTENT: + if not element._has_all_sources_resolved(): if element._get_workspace(): inconsistent_workspaced.append(element) else: @@ -375,7 +375,7 @@ class Pipeline: uncached = [] with self._context.messenger.timed_activity("Checking sources"): for element in elements: - if element._get_consistency() < Consistency.CACHED and not element._has_all_sources_in_source_cache(): + if not element._has_all_sources_in_source_cache() and not element._has_all_sources_cached(): uncached.append(element) if uncached: |