You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 07:50:37 UTC
[buildstream] 04/06: element.py: Split ready_for_runtime check into
an API-private method
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch jennis/rebase_fixups
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 8072bf9f34babde6c300c8d7671bb08bff859d69
Author: Jonathan Maw <jo...@codethink.co.uk>
AuthorDate: Wed Apr 17 17:18:06 2019 +0100
element.py: Split ready_for_runtime check into an API-private method
This is done because an external caller will be calling this in certain
circumstances.
---
buildstream/element.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/buildstream/element.py b/buildstream/element.py
index 357ce97..8cee859 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1293,9 +1293,7 @@ class Element(Plugin):
# Now we have the strong cache key, update the Artifact
self.__artifact._cache_key = self.__cache_key
- if not self.__ready_for_runtime and self.__cache_key is not None:
- self.__ready_for_runtime = all(
- dep.__ready_for_runtime for dep in self.__runtime_dependencies)
+ self._check_ready_for_runtime()
# _get_display_key():
#
@@ -2316,6 +2314,15 @@ class Element(Plugin):
source._update_state()
self.__consistency = min(self.__consistency, source._get_consistency())
+ # _check_ready_for_runtime():
+ #
+ # TODO: DOCSTRING
+ #
+ def _check_ready_for_runtime(self):
+ if not self.__ready_for_runtime and self._get_cache_key() is not None:
+ self.__ready_for_runtime = all(
+ dep.__ready_for_runtime for dep in self.__runtime_dependencies)
+
#############################################################
# Private Local Methods #