dnf-plugins-core/0016-Fix-dnf-copr-enable-on-Fedora-35.patch

29 lines
1.0 KiB
Diff

From 76d7c9e2d2fa052cc6d9fab08af51c603d7e20e5 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Fri, 16 Jul 2021 12:52:03 +0200
Subject: [PATCH] Fix 'dnf copr enable' on Fedora 35
The output from linux_distribution() changed so it returns:
>>> distro.linux_distribution()
('Fedora Linux', '35', '')
---
plugins/copr.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/copr.py b/plugins/copr.py
index 7fc6c6f..235989b 100644
--- a/plugins/copr.py
+++ b/plugins/copr.py
@@ -430,7 +430,7 @@ Bugzilla. In case of problems, contact the owner of this repository.
dist = linux_distribution()
# Get distribution architecture
distarch = self.base.conf.substitutions['basearch']
- if "Fedora" in dist:
+ if any([name in dist for name in ["Fedora", "Fedora Linux"]]):
if "Rawhide" in dist:
chroot = ("fedora-rawhide-" + distarch)
# workaround for enabling repos in Rawhide when VERSION in os-release
--
2.36.1