summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-12-14 21:58:06 +0100
committerJürg Billeter <j@bitron.ch>2020-12-14 21:58:06 +0100
commit21693fa5c5667ae22aec71538411a6616465adc0 (patch)
treee7e123658c15d6962c952a341cdb60fb774b41c9
parentace30ccf75ac71bb1f914406abd3577961027f93 (diff)
downloadbuildstream-21693fa5c5667ae22aec71538411a6616465adc0.tar.gz
minimal fix for test failures
-rw-r--r--src/buildstream/element.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 95690e17d..cb4809434 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1875,8 +1875,6 @@ class Element(Plugin):
context = self._get_context()
- self.__pull_pending = False
-
if not context.get_strict() and self.__artifact.cached():
# In non-strict mode, strong cache key becomes available when
# the artifact is cached
@@ -1911,11 +1909,11 @@ class Element(Plugin):
)
artifact.query_cache()
+ self.__pull_pending = False
if not pull and not artifact.cached(buildtree=pull_buildtrees):
if self.__artifacts.has_fetch_remotes(plugin=self) and not self._get_workspace():
# Artifact is not completely available in local cache and artifact remote server is available. Stop artifact loading here as pull is required to proceed.
self.__pull_pending = True
- return False
# Attempt to pull artifact with the strict cache key
pulled = pull and artifact.pull(pull_buildtrees=pull_buildtrees)
@@ -1923,6 +1921,8 @@ class Element(Plugin):
if artifact.cached() or context.get_strict():
self.__artifact = artifact
return pulled
+ elif self.__pull_pending:
+ return False
# In non-strict mode retry with weak cache key
artifact = Artifact(self, context, strict_key=self.__strict_cache_key, weak_key=self.__weak_cache_key)
@@ -3249,7 +3249,7 @@ class Element(Plugin):
# current state will also change - after all, we can now find
# a potential existing artifact.
self._load_artifact(pull=False)
- if self.__artifact:
+ if not self._pull_pending():
self._load_artifact_done()
# Update the message kwargs in use for this plugin to dispatch messages with