Blame SOURCES/0021-Fix-remove-when-no-repos-are-enabled-RhBz-2064341.patch

bc72d2
From 55f6691d5663c59b675064b04e19288365e92d24 Mon Sep 17 00:00:00 2001
bc72d2
From: Nicola Sella <nsella@redhat.com>
bc72d2
Date: Tue, 15 Mar 2022 16:26:10 +0100
bc72d2
Subject: [PATCH] Fix remove when no repos are enabled (RhBz:2064341)
bc72d2
bc72d2
msg: When no repositories are enabled, dnf group exits and does not
bc72d2
remove an installed group.
bc72d2
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2064341
bc72d2
type: bugfix
bc72d2
---
bc72d2
 dnf/cli/commands/group.py | 3 ++-
bc72d2
 1 file changed, 2 insertions(+), 1 deletion(-)
bc72d2
bc72d2
diff --git a/dnf/cli/commands/group.py b/dnf/cli/commands/group.py
bc72d2
index fd723c48..c5c23230 100644
bc72d2
--- a/dnf/cli/commands/group.py
bc72d2
+++ b/dnf/cli/commands/group.py
bc72d2
@@ -358,7 +358,8 @@ class GroupCommand(commands.Command):
bc72d2
         else:
bc72d2
             demands.available_repos = True
bc72d2
 
bc72d2
-        commands._checkEnabledRepo(self.base)
bc72d2
+        if cmd not in ('remove'):
bc72d2
+            commands._checkEnabledRepo(self.base)
bc72d2
 
bc72d2
         if cmd in ('install', 'upgrade'):
bc72d2
             commands._checkGPGKey(self.base, self.cli)
bc72d2
-- 
bc72d2
2.35.1
bc72d2