summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <bschubert15@bloomberg.net>2019-12-13 11:28:16 +0000
committerBenjamin Schubert <bschubert15@bloomberg.net>2020-01-16 16:33:19 +0000
commitbe1a14d0dc6e308d90de2828865fa0f797c254d5 (patch)
tree52d2c500f0a412706398d1e8f7a041da45bc678e
parent5626988b7a81280d29826709a67723345b867545 (diff)
downloadbuildstream-be1a14d0dc6e308d90de2828865fa0f797c254d5.tar.gz
element.py: Stop asserting we are cached after fetch and mark us as such
This assert would only be run in development mode and would actually not mark the source as downloaded. Therefore forcefully mark them as fetched and remove the assert. Our test suite will catch if there is a problem.
-rw-r--r--src/buildstream/element.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 6f7a9ab71..d7ede31f1 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1739,18 +1739,13 @@ class Element(Plugin):
# fetched_original (bool): Whether the original sources had been asked (and fetched) or not
#
def _fetch_done(self, fetched_original):
+ self.__has_all_sources_in_source_cache = True
+ if fetched_original:
+ self.__has_all_sources_cached = True
+
for source in self.__sources:
source._fetch_done(fetched_original)
- # We are not updating the state recursively here since fetching can
- # never end up in updating them.
-
- # Fetching changes the source state from RESOLVED to CACHED
- # Fetching cannot change the source state from INCONSISTENT to CACHED because
- # we prevent fetching when it's INCONSISTENT.
- # Therefore, only the source state will change.
- self.__update_resolved_state()
-
# _pull_pending()
#
# Check whether the artifact will be pulled. If the pull operation is to