diff --git a/CHANGES/3484.bugfix b/CHANGES/3484.bugfix new file mode 100644 index 000000000..f87d9fe70 --- /dev/null +++ b/CHANGES/3484.bugfix @@ -0,0 +1 @@ +Fix publications created by mirror_complete syncs not having checksum_type set properly. diff --git a/pulp_rpm/app/migrations/0060_rpmpublication_compression_type_empty.py b/pulp_rpm/app/migrations/0060_rpmpublication_compression_type_empty.py new file mode 100644 index 000000000..86b974ee9 --- /dev/null +++ b/pulp_rpm/app/migrations/0060_rpmpublication_compression_type_empty.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.5 on 2023-11-07 03:51 + +from django.db import migrations, models + + +def set_publication_checksum(apps, schema_editor): + RpmPublication = apps.get_model("rpm", "RpmPublication") + RpmPublication.objects.filter(checksum_type="").update(checksum_type="unknown") + + +class Migration(migrations.Migration): + + dependencies = [ + ('rpm', '0059_rpmpublication_compression_type_and_more'), + ] + + operations = [ + migrations.RunPython(set_publication_checksum), + ] diff --git a/pulp_rpm/app/tasks/synchronizing.py b/pulp_rpm/app/tasks/synchronizing.py index 57cea6322..c54ea63f9 100644 --- a/pulp_rpm/app/tasks/synchronizing.py +++ b/pulp_rpm/app/tasks/synchronizing.py @@ -577,6 +577,7 @@ def is_subrepo(directory): ) repo_gpgcheck = has_repomd_signature and repository.repo_config.get("repo_gpgcheck", 0) + publication.checksum_type = CHECKSUM_TYPES.UNKNOWN publication.package_checksum_type = CHECKSUM_TYPES.UNKNOWN publication.metadata_checksum_type = CHECKSUM_TYPES.UNKNOWN publication.repo_config = {