I manually applied the patches like so, and restarted services. However, it didn’t fix the existing repo. I still see blank rows, and reupload packages in the same repo or new still has the same issue. Any advice?
patch /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.4.1/app/services/katello/pulp3/deb.rb << EOF
--- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.4.1/app/services/katello/pulp3/deb.rb.orig 2022-09-17 07:52:03.368158366 +0100
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.4.1/app/services/katello/pulp3/deb.rb 2022-09-17 07:54:18.740332296 +0100
@@ -9,6 +9,7 @@
end
def self.content_api_create(opts = {})
+ opts.delete(:relative_path) if opts.key?(:relative_path)
self.content_api.create(opts)
end
@@ -24,7 +25,8 @@
end
def self.generate_model_row(unit)
- {
+ unit = unit.try(:with_indifferent_access)
+ return {
pulp_id: unit[unit_identifier],
checksum: unit[:sha256],
filename: unit[:relative_path],
EOF
patch /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.4.1/app/services/katello/pulp3/pulp_content_unit.rb << EOF
--- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.4.1/app/services/katello/pulp3/pulp_content_unit.rb.orig 2022-09-17 08:04:37.654697625 +0100
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.4.1/app/services/katello/pulp3/pulp_content_unit.rb 2022-09-17 08:05:51.107334263 +0100
@@ -141,6 +141,8 @@
elsif repository.generic?
duplicate_sha_path_content_list = content_backend_service.content_api(repository.repository_type, unit_type_id).list(
filter_label => checksum)
+ elsif unit_type_id == 'deb'
+ duplicate_sha_path_content_list = content_backend_service.content_api.list(filter_label => checksum)
else
duplicate_sha_path_content_list = content_backend_service.content_api.list(
filter_label => checksum,
EOF