Actions
Bug #31801
closedKatello not able to handle kickstarts with multiple variants effectively
Description
Referenced from this thread https://community.theforeman.org/t/centos-8-baseos-thinks-it-is-appstream/22206/4
Kickstart repos related to Centos 8 tend to have multiple variants. For example http://mirror.centos.org/centos/8/BaseOS/x86_64/kickstart/.treeinfo has 2 variants while http://mirror.centos.org/centos/8/AppStream/x86_64/kickstart/.treeinfo has only one.
If I synced baseos first Katello seems to arbitrarily pick the first variant and assign it to the repository
Check out https://github.com/Katello/katello/blob/master/app/services/katello/pulp3/repository/yum.rb#L53 with the following code.
def import_distribution_data distribution = ::Katello::Pulp3::Distribution.fetch_content_list(repository_version: repo.version_href) if distribution.results.present? repo.update!( :distribution_version => distribution.results.first.release_version, :distribution_arch => distribution.results.first.arch, :distribution_family => distribution.results.first.release_name, :distribution_bootable => self.class.distribution_bootable?(distribution) ) unless distribution.results.first.variants.empty? unless distribution.results.first.variants.first.name.nil? repo.update!(:distribution_variant => distribution.results.first.variants.first.name) end end end end
Notice that it picks only the first variant.
Actions