daklib.tag2upload¶
functions related to handling uploads via tag2upload
@contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2025, Ansgar <ansgar@debian.org> @license: GNU General Public License version 2 or later
Functions
|
extract tag2upload information for an upload |
|
mangle version according to DEP-14 |
|
parse Git-Tag-Info field from .changes files |
|
verify and parse information from Git tag and its detached signature |
Classes
|
|
|
|
|
Exceptions
raised when the helper program returned an error or wrong information |
- exception daklib.tag2upload.HelperException[source]¶
raised when the helper program returned an error or wrong information
- class daklib.tag2upload.Tag(object: 'str', type: 'str', tag: 'str', tagger: 'str', message: 'str')[source]¶
- class daklib.tag2upload.TagInfo(tag: 'Tag', metadata: 'Metadata', signed_file: 'SignedFile')[source]¶
-
- signed_file: SignedFile¶
- daklib.tag2upload._dgit_metadata(message: str) dict[str, Union[str, bool]] [source]¶
extract dgit metadata from tag message
The metadata can be of the form keyword or keyword=value. For metadata without a value, we store True in the returned dict; otherwise the provided value is stored.
- daklib.tag2upload._get_base64(d: Mapping, key: str) bytes [source]¶
retrieve key from the mapping and decode it as base64
- Raises:
KeyError: when the requested key is not in the mapping ValueError: when the requested entry is not a string
- daklib.tag2upload.get_tag2upload_info_for_upload(upload: daklib.archive.ArchiveUpload) tuple[daklib.upload.HashedFile, TagInfo] [source]¶
extract tag2upload information for an upload
- daklib.tag2upload.mangle_version_dep14(version: str) str [source]¶
mangle version according to DEP-14
- daklib.tag2upload.parse_git_tag_info(value: str) GitTagInfo [source]¶
parse Git-Tag-Info field from .changes files
- daklib.tag2upload.verify_and_parse_git_tag(tag: bytes, signature: bytes, *, keyrings: Iterable[str]) TagInfo [source]¶
verify and parse information from Git tag and its detached signature
- Raises:
daklib.gpg.GpgException: when signature is invalid ValueError: when passed information is syntactically invalid