gtristan commented on code in PR #87:
URL:
https://github.com/apache/buildstream-plugins/pull/87#discussion_r2072390848
##########
src/buildstream_plugins/sources/bzr.py:
##########
@@ -53,17 +53,37 @@
# revision number to the one on the tip of the branch specified in 'track'.
ref: 6622
+ # Specify the version to be reported as the *guess_version* when reporting
+ # SourceInfo
+ #
+ # Since 2.5
+ #
+ version: 1.2
+
See `built-in functionality doumentation
<https://docs.buildstream.build/master/buildstream.source.html#core-source-builtins>`_
for
details on common configuration options for sources.
+
+
+Reporting `SourceInfo
<https://docs.buildstream.build/master/buildstream.source.html#buildstream.source.SourceInfo>`_
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The bzr source reports the URL of the bzr repository as the *url*.
+
+Further, the bzr source reports the ``SourceInfoMedium.BZR`` *medium* and
+the ``SourceVersionType.COMMIT`` *version_type*, for which it reports the bzr
revision
+number as the *version*.
+
+Since the bzr source does not have a way to know what the release version
+corresponds to the revision number, the bzr source exposes the ``version``
configuration
+attribute to allow explicit specification of the *guess_version*.
"""
import os
import shutil
import fcntl
from contextlib import contextmanager
-from buildstream import Source, SourceError
+from buildstream import Source, SourceError, SourceInfoMedium,
SourceVersionType
Review Comment:
On second thought, I won't do this right now, as I don't think it's right to
tag `2.5.0.dev0` on the `tristan/sboms` branch in buildstream.
I think the right thing to do is:
* land the buildstream branch
* tag 2.5.0.dev0
* update this branch to add the appropriate `Plugin.BST_MIN_VERSION`
annotations
* Probably we want to update `project.conf` and the setup.py (however
oddly, I don't see buildstream-plugins depending on buildstream anywhere in
setup.py, pyproject.toml or requirements files)
* land this branch
--
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]