Skip to content

Commit

Permalink
Add support for zstd metadata
Browse files Browse the repository at this point in the history
closes #3254
  • Loading branch information
dralley committed Sep 19, 2023
1 parent ecd6850 commit 1e16fe6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES/3254.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for reading zstd metadata.
8 changes: 4 additions & 4 deletions pulp_rpm/app/tasks/publishing.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ def generate_repo_metadata(
mod_yml_path = os.path.join(cwd, "modules.yaml")
comps_xml_path = os.path.join(cwd, "comps.xml")

pri_xml = cr.PrimaryXmlFile(pri_xml_path)
fil_xml = cr.FilelistsXmlFile(fil_xml_path)
oth_xml = cr.OtherXmlFile(oth_xml_path)
pri_xml = cr.PrimaryXmlFile(pri_xml_path, compressiontype=cr.GZ)
fil_xml = cr.FilelistsXmlFile(fil_xml_path, compressiontype=cr.GZ)
oth_xml = cr.OtherXmlFile(oth_xml_path, compressiontype=cr.GZ)
upd_xml = None

if publication.sqlite_metadata:
Expand Down Expand Up @@ -584,7 +584,7 @@ def generate_repo_metadata(
update_records = UpdateRecord.objects.filter(pk__in=content).order_by("id", "digest")
for update_record in update_records.iterator():
if not upd_xml:
upd_xml = cr.UpdateInfoXmlFile(upd_xml_path)
upd_xml = cr.UpdateInfoXmlFile(upd_xml_path, compressiontype=cr.GZ)
upd_xml.add_chunk(cr.xml_dump_updaterecord(update_record.to_createrepo_c()))

# Process modulemd, modulemd_defaults and obsoletes
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
createrepo_c~=0.20.1
createrepo_c~=1.0.0
django_readonly_field~=1.1.1
jsonschema>=4.6,<5.0
libcomps>=0.1.15.post1,<0.2
Expand Down

0 comments on commit 1e16fe6

Please sign in to comment.