rpm-software-management / dnf-plugins-core

Core DNF Plugins
GNU General Public License v2.0
111 stars 142 forks source link

copr plugin: _guess_chroot does not handle centos stream properly #524

Open jakub-vavra-cz opened 9 months ago

jakub-vavra-cz commented 9 months ago

I am trying to enable repo on centos stream 9 "dnf -y copr enable --hub copr.fedorainfracloud.org @sssd/pr7193" It is incorrectly defaulting to epel-9-x86_64 instead of centos-stream-9-x86_64:

2024-03-01T11:35:55 Repository 'epel-9-x86_64' does not exist in project '@sssd/pr7193'. 2024-03-01T11:35:55 Available repositories: 'fedora-38-x86_64', 'fedora-40-x86_64', 'centos-stream-9-x86_64', 'fedora-rawhide-x86_64', 'fedora-39-x86_64'

I do not want to put there repo explicitly as I want to reuse same code on centos, fedora and rhel.

carlwgeorge commented 7 months ago

Back in version 4.0.23 and earlier of the plugin, CentOS Stream would match EPEL chroots because epel-%s-x86_64 was the default if the system didn't identify as Fedora, Mageia, or openSUSE. In version 4.0.24, this was "fixed" to special case CentOS Stream to match centos-stream-{0}-{1} chroots. This caused lots of complaints from users and maintainers, for several reasons.

Due to these problems, that "fix" was reverted in version 4.3.0. Reverting the revert will be a mistake and bring back all of these same problems. This issue and the accompanying pull request (#525) should be closed.