Bug #31455
closedWeb UI shows duplicate rpms when user uploads the same rpm that signed with different checksum
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1883722
Description of problem:
Re-sign a rpm that is already existed in the repository and re-upload it to the Katello repository causes duplicate rpms in the Web UI.
Steps to Reproduce:
1. Buld or prepare an unsigned rpm.
2. Create a gpg key.
3. Use the gpg key to sign the rpm with sha1.
4. Create a rpm repository in Katello.
5. Upload the sha1 signed rpm to the repository.
6. Use the gpg key to re-sign the rpm with sha2 again.
7. Upload the sha2 signed rpm to the repository.
Actual results:
Web UI shows that the repository contains duplicate rpms
Expected results:
No duplicate rpms show in the Web UI
Additional info:
Reindex the repository fixes the issue
echo '
Katello::Repository.find(<REPLACE THIS WITH THE REPO ID>).index_content
' | foreman-rake console