Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38096 - Fix flat APT repo handling #11259

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading