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-plugins.git

commit 995772b06623046a3cf382c41d58c688cfbc4373
Author: Tristan van Berkom <[email protected]>
AuthorDate: Sun Mar 30 18:25:49 2025 +0900

    sources/patch.py: Implement collect_source_info()
---
 src/buildstream_plugins/sources/patch.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/buildstream_plugins/sources/patch.py 
b/src/buildstream_plugins/sources/patch.py
index 1eece2b..fc157d0 100644
--- a/src/buildstream_plugins/sources/patch.py
+++ b/src/buildstream_plugins/sources/patch.py
@@ -48,7 +48,7 @@ details on common configuration options for sources.
 """
 
 import os
-from buildstream import Source, SourceError
+from buildstream import Source, SourceError, SourceInfo, SourceInfoMedium, 
SourceVersionType
 from buildstream import utils
 
 
@@ -114,6 +114,11 @@ class PatchSource(Source):
                 fail="Failed to apply patch {}".format(self.path),
             )
 
+    def collect_source_info(self):
+        return [
+            SourceInfo(self.path, SourceInfoMedium.LOCAL, 
SourceVersionType.SHA256, utils.sha256sum(self.fullpath))
+        ]
+
 
 # Plugin entry point
 def setup():

Reply via email to