summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-04-15 11:15:29 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-05-15 10:18:26 +0000
commitf4f77391b206f9a50a8e7f5d1093761ec69f6402 (patch)
tree17ab7505521118351831db6294b782b910ba82d1
parent425fbf2ee786dcd7ea6b9f17ee96400fb36b3f7e (diff)
downloadbuildstream-f4f77391b206f9a50a8e7f5d1093761ec69f6402.tar.gz
Remove unused progress callback
-rw-r--r--buildstream/_artifactcache.py3
-rw-r--r--buildstream/_cas/cascache.py5
-rw-r--r--buildstream/_sourcecache.py4
-rw-r--r--buildstream/element.py17
4 files changed, 10 insertions, 19 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py
index 5abb3b45f..734a8e994 100644
--- a/buildstream/_artifactcache.py
+++ b/buildstream/_artifactcache.py
@@ -308,13 +308,12 @@ class ArtifactCache(BaseCache):
# Args:
# element (Element): The Element whose artifact is to be fetched
# key (str): The cache key to use
- # progress (callable): The progress callback, if any
# pull_buildtrees (bool): Whether to pull buildtrees or not
#
# Returns:
# (bool): True if pull was successful, False if artifact was not available
#
- def pull(self, element, key, *, progress=None, pull_buildtrees=False):
+ def pull(self, element, key, *, pull_buildtrees=False):
display_key = key[:self.context.log_key_length]
project = element._get_project()
diff --git a/buildstream/_cas/cascache.py b/buildstream/_cas/cascache.py
index 0bdb2062d..6d76de14a 100644
--- a/buildstream/_cas/cascache.py
+++ b/buildstream/_cas/cascache.py
@@ -251,14 +251,11 @@ class CASCache():
# Args:
# ref (str): The ref to pull
# remote (CASRemote): The remote repository to pull from
- # progress (callable): The progress callback, if any
- # subdir (str): The optional specific subdir to pull
- # excluded_subdirs (list): The optional list of subdirs to not pull
#
# Returns:
# (bool): True if pull was successful, False if ref was not available
#
- def pull(self, ref, remote, *, progress=None):
+ def pull(self, ref, remote):
try:
remote.init()
diff --git a/buildstream/_sourcecache.py b/buildstream/_sourcecache.py
index 04a5d5d86..1d3342a75 100644
--- a/buildstream/_sourcecache.py
+++ b/buildstream/_sourcecache.py
@@ -190,7 +190,7 @@ class SourceCache(BaseCache):
#
# Returns:
# (bool): True if pull successful, False if not
- def pull(self, source, *, progress=None):
+ def pull(self, source):
ref = source._get_source_name()
project = source._get_project()
@@ -201,7 +201,7 @@ class SourceCache(BaseCache):
try:
source.status("Pulling source {} <- {}".format(display_key, remote.spec.url))
- if self.cas.pull(ref, remote, progress=progress):
+ if self.cas.pull(ref, remote):
source.info("Pulled source {} <- {}".format(display_key, remote.spec.url))
# no need to pull from additional remotes
return True
diff --git a/buildstream/element.py b/buildstream/element.py
index 562a67777..a17a90539 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1918,18 +1918,15 @@ class Element(Plugin):
def _pull(self):
context = self._get_context()
- def progress(percent, message):
- self.status(message)
-
# Get optional specific subdir to pull and optional list to not pull
# based off of user context
pull_buildtrees = context.pull_buildtrees
# Attempt to pull artifact without knowing whether it's available
- pulled = self.__pull_strong(progress=progress, pull_buildtrees=pull_buildtrees)
+ pulled = self.__pull_strong(pull_buildtrees=pull_buildtrees)
if not pulled and not self._cached() and not context.get_strict():
- pulled = self.__pull_weak(progress=progress, pull_buildtrees=pull_buildtrees)
+ pulled = self.__pull_weak(pull_buildtrees=pull_buildtrees)
if not pulled:
return False
@@ -2867,11 +2864,10 @@ class Element(Plugin):
# Returns:
# (bool): Whether or not the pull was successful
#
- def __pull_strong(self, *, progress=None, pull_buildtrees):
+ def __pull_strong(self, *, pull_buildtrees):
weak_key = self._get_cache_key(strength=_KeyStrength.WEAK)
key = self.__strict_cache_key
- if not self.__artifacts.pull(self, key, progress=progress,
- pull_buildtrees=pull_buildtrees):
+ if not self.__artifacts.pull(self, key, pull_buildtrees=pull_buildtrees):
return False
# update weak ref by pointing it to this newly fetched artifact
@@ -2885,16 +2881,15 @@ class Element(Plugin):
# the weak cache key
#
# Args:
- # progress (callable): The progress callback, if any
# subdir (str): The optional specific subdir to pull
# excluded_subdirs (list): The optional list of subdirs to not pull
#
# Returns:
# (bool): Whether or not the pull was successful
#
- def __pull_weak(self, *, progress=None, pull_buildtrees):
+ def __pull_weak(self, *, pull_buildtrees):
weak_key = self._get_cache_key(strength=_KeyStrength.WEAK)
- if not self.__artifacts.pull(self, weak_key, progress=progress,
+ if not self.__artifacts.pull(self, weak_key,
pull_buildtrees=pull_buildtrees):
return False