Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate 'package_checksum_type' and 'metadata_checksum_type' #3342

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Nov 29, 2023

closes #2480

@dralley dralley requested a review from ipanova November 29, 2023 03:26
@dralley
Copy link
Contributor Author

dralley commented Nov 29, 2023

I'm splitting this PR off of the other one, they're worth keeping separate.

@dralley dralley force-pushed the deprecate-checksum-types branch 2 times, most recently from fd330b8 to 47fd2ba Compare November 29, 2023 04:59
publication.package_checksum_type = (
checksum_types.get("package") or publication.metadata_checksum_type
)
checksum_type = get_checksum_type("primary", checksum_types)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this use 'general'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this code is correct. If you look at the definition of get_checksum_type(), it does query "general" first. The string "primary" is used when looking up the original metadata checksum type noted at sync time, if the user didn't specify one. And if the repo wasn't recently synced and the user didn't provide a specific one, then it falls back to default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants