dnf-plugins-core/0001-Fix-dnf-copr-enable-on-Fedora-35.patch
2021-07-23 08:19:46 +02:00

29 lines
1.0 KiB
Diff

From 841b00af5c87b4ee7b8eb79152ec8cacf7e54c00 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 4644495..5cf17ef 100644
--- a/plugins/copr.py
+++ b/plugins/copr.py
@@ -431,7 +431,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
--
libgit2 1.0.1