Project

Profile

Help

Issue #8571

closed

Publishing raises forbidden checksum error when it shouldn't

Added by daviddavis over 3 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 105
Quarter:

Description

Steps to reproduce:

  1. Enable md5 via ALLOWED_CONTENT_CHECKSUMS and sync down an md5 repository (eg https://fixtures.pulpproject.org/rpm-with-md5/)
  2. Disable md5 and run pulpcore-manager handle-artifact-checksums
  3. Now create a publication for your repository version using an allowed checksum:
http :/pulp/api/v3/publications/rpm/rpm/ repository_version=/pulp/api/v3/repositories/rpm/rpm/a1263205-e97a-452f-a674-f516714812c6/versions/1/ package_checksum_type="sha256"

You'll get this error:

ValueError: Package camel-0:0.1-1.noarch as content unit 6d518294-c03c-4cf1-b8ef-0e663b73274a contains forbidden checksum type 'md5', thus can't be published. Checksum must be one of the allowed checksum types.

I believe this check is faulty since it solely checks rpm_package.checksum_type and doesn't consider package_checksum_type.


Related issues

Copied to RPM Support - Backport #9332: Backport #8571 "Publishing raises forbidden checksum error when it shouldn't" to 3.14.zCLOSED - CURRENTRELEASEdalley

Actions

Also available in: Atom PDF