You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:47:37 UTC
[buildstream] 05/10: buildstream/plugins/sources/ostree.py:
Implement update_mirror.
This is an automated email from the ASF dual-hosted git repository.
root pushed a commit to branch valentindavid/update_mirror
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 127087dcb396e56e6b165fdc1751e35d0453a71d
Author: Valentin David <va...@codethink.co.uk>
AuthorDate: Thu Apr 26 10:08:41 2018 +0200
buildstream/plugins/sources/ostree.py: Implement update_mirror.
---
buildstream/plugins/sources/ostree.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/buildstream/plugins/sources/ostree.py b/buildstream/plugins/sources/ostree.py
index b311e24..f5f948b 100644
--- a/buildstream/plugins/sources/ostree.py
+++ b/buildstream/plugins/sources/ostree.py
@@ -122,6 +122,14 @@ class OSTreeSource(Source):
raise SourceError("{}: Failed to fetch ref '{}' from origin: {}\n\n{}"
.format(self, self.ref, self.url, e)) from e
+ def update_mirror(self):
+ self.ensure()
+ try:
+ _ostree.fetch(self.repo, progress=self.progress)
+ except OSTreeError as e:
+ raise SourceError("{}: Failed to fetch from origin: {}\n\n{}"
+ .format(self, self.url, e)) from e
+
def stage(self, directory):
self.ensure()