This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tristan/sboms in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit b516fce3fe0afd027fd041be300ac35c4b1673c8 Author: Tristan van Berkom <[email protected]> AuthorDate: Tue Mar 4 15:45:50 2025 +0900 downloadablefilesource.py: Implement collect_source_info() --- src/buildstream/downloadablefilesource.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/buildstream/downloadablefilesource.py b/src/buildstream/downloadablefilesource.py index 48c164670..3e31a63c1 100644 --- a/src/buildstream/downloadablefilesource.py +++ b/src/buildstream/downloadablefilesource.py @@ -270,6 +270,15 @@ class DownloadableFileSource(Source): "File downloaded from {} has sha256sum '{}', not '{}'!".format(self.url, sha256, self.ref) ) + def collect_source_info(self): + # + # XXX remote sources are not necessarily archives, perhaps we should + # allow downloadablefilesource imlementations to choose the SourceInfoMedium + # + return [ + SourceInfo(self.url, SourceInfoMedium.ARCHIVE, SourceVersionType.SHA256, self.ref) + ] + def _get_etag(self, ref): etagfilename = os.path.join(self._mirror_dir, "{}.etag".format(ref)) if os.path.exists(etagfilename):
