Skip to content

Commit

Permalink
Fixes #38096 - Fix flat APT repo handling
Browse files Browse the repository at this point in the history
  • Loading branch information
quba42 authored and m-bucher committed Dec 18, 2024
1 parent b551d41 commit cf57e55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/models/katello/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1059,10 +1059,15 @@ def deb_pulp_components(version_href = self.version_href)
pulp_api.list({:repository_version => version_href}).results.map { |x| x.component }.uniq
end

def deb_sanitize_pulp_distribution(distribution)
return "flat-repo" if distribution&.end_with?("/")
distribution
end

def deb_pulp_distributions(version_href = self.version_href)
return [] if version_href.blank?
pulp_api = Katello::Pulp3::Repository.instance_for_type(self, SmartProxy.pulp_primary).api.content_release_components_api
pulp_api.list({:repository_version => version_href}).results.map { |x| x.distribution }.uniq
pulp_api.list({:repository_version => version_href}).results.map { |x| deb_sanitize_pulp_distribution(x.distribution) }.uniq
end

def sync_status
Expand Down

0 comments on commit cf57e55

Please sign in to comment.