Skip to content

Commit

Permalink
Detect CentOS properly instead of defaulting to epel
Browse files Browse the repository at this point in the history
= changelog =
msg: Fix detection of CentOS Stream
type: bugfix
resolves: rpm-software-management#524
  • Loading branch information
jakub-vavra-cz committed Mar 8, 2024
1 parent 9fa509e commit 2aaeccb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/copr.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,8 @@ def _guess_chroot(self):
chroot = ("fedora-rawhide-" + distarch)
else:
chroot = ("fedora-{0}-{1}".format(dist[1], distarch))
elif "CentOS Stream" in dist:
chroot = ("centos-stream-{}-{}".format(dist[1].split(".", 1)[0], distarch if distarch else "x86_64"))
elif "Mageia" in dist:
# Get distribution architecture (Mageia does not use $basearch)
distarch = rpm.expandMacro("%{distro_arch}")
Expand Down

0 comments on commit 2aaeccb

Please sign in to comment.