franred commented on code in PR #2099:
URL: https://github.com/apache/buildstream/pull/2099#discussion_r2727168359
##########
src/buildstream/source.py:
##########
@@ -1387,14 +1402,22 @@ def create_source_info(
version: A string which represents a unique version of this source
input
version_guess: An optional string representing the guessed human
readable version
extra_data: Additional plugin defined key/values
+ provenance_node: An optional :class:`Node <buildstream.node.Node>`
with source provenance attributes,
+ defaults to the provenance specified at the top
level of the source.
*Since: 2.5*
"""
homepage = None
issue_tracker = None
- if self.__provenance is not None:
- homepage = self.__provenance.homepage
- issue_tracker = self.__provenance.issue_tracker
+
+ if provenance_node is not None:
+ source_provenance: Optional[_SourceProvenance] =
_SourceProvenance.new_from_node(provenance_node)
+ else:
+ source_provenance = self.__provenance
+
+ if source_provenance is not None:
+ homepage = source_provenance.homepage
+ issue_tracker = source_provenance.issue_tracker
Review Comment:
I can see this has been changed in a future commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]