Skip to content

Make PGP signatures optional in desc files

David Runge requested to merge optional_pgpsig into main

repod/common/models.py: Change pgpgsig to Optional[str], as desc files may be created without the %PGPSIG% field.

repod/repo/package/syncdb.py: Move pgpsig in PACKAGE_DESC_VERSIONS from required to optional.

repod/templates/desc_v1.j2: Change template to only create and populate the %PGPSIG% field if pgpsig is not None.

tests/repo/package/test_syncdb.py: Add test case to test_package_desc_from_dict_derive_file_versions() to test the scenario in which no pgpsig is provided.

tests/test_convert.py: Change test_file_data_to_model() to include a test case in which only the required fields are present (and no pgpsig). Change test_repodbfile_render_desc_template() to also include a case in which pgpsig is not used.

Fixes #72 (closed)

Edited by David Runge

Merge request reports

Loading