From e939f6b91e85c29c825fec78d669be71e054184d Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Tue, 12 Dec 2023 21:45:43 -0500 Subject: [PATCH] Support the --checksum-type option and deprecate legacy options --package-checksum-type and --metadata-checksum-type are now deprecated. closes #850 --- pulpcore/cli/rpm/repository.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pulpcore/cli/rpm/repository.py b/pulpcore/cli/rpm/repository.py index 803cce43d..29aa6fda1 100644 --- a/pulpcore/cli/rpm/repository.py +++ b/pulpcore/cli/rpm/repository.py @@ -144,17 +144,31 @@ def repository(ctx: click.Context, pulp_ctx: PulpCLIContext, repo_type: str) -> remote_option, metadata_signing_service_option, click.option( - "--metadata-checksum-type", type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False) + "--metadata-checksum-type", + type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False), + help=_("DEPRECATED: Option specifying the checksum type to use for repository metadata."), ), click.option( - "--package-checksum-type", type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False) + "--package-checksum-type", + type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False), + help=_( + "DEPRECATED: Option specifying the checksum type to use for packages in " + "repository metadata." + ), + ), + click.option( + "--checksum-type", + type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False), + help=_( + "Option specifying the checksum type to use for package and metadata integrity checks." + ), ), click.option( "--gpgcheck", type=click.Choice(("0", "1")), callback=choice_to_int_callback, help=_( - """DEPRECATED:Option specifying whether a client should perform a GPG signature check + """DEPRECATED: Option specifying whether a client should perform a GPG signature check on packages.""" ), ), @@ -163,7 +177,7 @@ def repository(ctx: click.Context, pulp_ctx: PulpCLIContext, repo_type: str) -> type=click.Choice(("0", "1")), callback=choice_to_int_callback, help=_( - """DEPRECATED:Option specifying whether a client should perform a GPG signature check + """DEPRECATED: Option specifying whether a client should perform a GPG signature check on the repodata.""" ), ),